tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: compound depends



On Tuesday, at 14:47, Aleksey Cheusov wrote:
| If you use AWK for REAL WORLD problems ;-)
| have a look at lang/runawk.
| It provides powerful AWK wrapper and dozens of AWK functions including
| "braceexpand" for handling csh-like alternatives,
| "glob2ere" (similar to your glob2ere), "glob" (matcher)
| and a lot of others. AWK functions for dewey are implemented in
| pkgtools/pkg_summary-utils (pkgsrc-dewey.awk and psu_funcs.awk,
| most utilities in this package
| are implemented with a help of runawk).
| Also runawk has great options handling capabilities.

Hi,

Thanks for the link. I remember coming accross runawk once, and did not have a
deep look at it simply because of the sparse DESCR (or rather the DESCR
focusing only on the wrapper, which I was not really interested in). IMHO you
could improve it a lot by adding what you just wrote above, so that one is
aware that there are also utility functions :) (I agree this is already in the
DESCR, but giving an explicit list of salient examples could help).

I would certainly have reused the brace expansion and probably a few others.
I'm not sure I would have used the wrapper, since the script in question is
only to be called internally, so using multiple -f does not hurt here.

That said, the main purpose of my script is to reduce a list of dependency, in
a more general manner than pkgsrc's reduce_depends.awk. For instance, I do have
real-world packages that require "python>=3" and then
"python{>=2.7<2.8,>=3.2<3.3}" via an indirect dependency. I wanted those to be
effectively merged into "python>=3.2<3.3" (in this example) so that the proper
python version is searched in the system (or an inconsistency detected).

Something missing to runawk ? :)


Home | Main Index | Thread Index | Old Index