Return-Path: Delivered-To: new-httpd-archive@hyperreal.org Received: (qmail 15340 invoked by uid 6000); 23 Oct 1998 06:23:44 -0000 Received: (qmail 15332 invoked from network); 23 Oct 1998 06:23:41 -0000 Received: from slarti.muc.de (193.174.4.10) by taz.hyperreal.org with SMTP; 23 Oct 1998 06:23:41 -0000 Received: (qmail 29033 invoked by uid 66); 23 Oct 1998 06:23:38 -0000 Received: by en1.engelschall.com (Sendmail 8.9.1) for new-httpd@apache.org id IAA26263; Fri, 23 Oct 1998 08:21:37 +0200 (CEST) Message-ID: <19981023082137.A25985@engelschall.com> Date: Fri, 23 Oct 1998 08:21:37 +0200 From: "Ralf S. Engelschall" To: new-httpd@apache.org Subject: Re: [PATCH] APACI: --permute-module=foo:bar Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i Organization: Engelschall, Germany. X-Web-Homepage: http://www.engelschall.com/ X-PGP-Public-Key: http://www.engelschall.com/ho/rse/pgprse.asc X-PGP-Fingerprint: 00 C9 21 8E D1 AB 70 37 DD 67 A2 3A 0A 6F 8D A5 Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org 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