httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf S. Engelschall" <...@engelschall.com>
Subject Re: [PATCH] APACI: --permute-module=foo:bar
Date Fri, 23 Oct 1998 06:21:37 GMT

In article <362F783C.78AB2767@algroup.co.uk> you wrote:
> Ralf S. Engelschall wrote:
>> 
i>[...]
>> For the good old edit-src/Configuration-manually approach of configuring this
>> is trivial: Permute the AddModule lines in the editor. But APACI (especially
>> --add-module) didn't provide this functionality in batch because when I wrote
>> APACI initially I though this functionality cannot be done in a portable way
>> with /bin/sh, awk and sed.  Recently people mailed me again that they would
>> appreciate this functionality, so I thought about the implementation again and
>> discovered that it can be done in a portable way. Not really an easy way and
>> short (oneliner!) way, but at least in a portable way (which is more important
>> for us than a few code lines more).

> I'd've thought this would be a relatively straightforward application of
> tsort.

> Another advantage of using tsort would be that it could diagnose
> misordering of modules for us.

I intentionally avoided any tsort, perl or whatever hacks for portability
reasons. One reason why our configuration scripts work on really all Unix
flavors is that we force us to use only /bin/sh, awk, sed, grep and a few more
standard commands. "tsort" is not of this type, even one could reduce the
implementation dramatically with it. One can also use some sed-based hacks,
but again only with very advanced (= non-portable) sed commands. So I finally
decided that an awk-based solution is the only really portable way. Because I
used only awk-features we _already_ use in configure and src/Configure.

So, please understand that the more complicated awk-approach seems to be the
best for our solution, IMO.

BTW, Ben H. already mentioned to me that the ^:foo and foo:$ syntax should be
replaced by an easier to read variant. Sounds reasonable. I'll use BEGIN:foo
and foo:END or similar syntax in take 2 of the patch.

                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com

Mime
View raw message