home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.mail.uucp
- Path: sparky!uunet!sun-barr!cs.utexas.edu!hermes.chpc.utexas.edu!news.utdallas.edu!corpgate!bnrgate!bwdls61!bwdlh118!clewis
- From: clewis@bwdlh118.bnr.ca (Chris Lewis)
- Subject: Re: "file" directives in the UUCP maps???
- Message-ID: <1992Jul30.174029.14834@bwdls61.bnr.ca>
- Sender: usenet@bwdls61.bnr.ca (Use Net)
- Nntp-Posting-Host: bwdlh118
- Organization: Bell Northern Research
- References: <1992Jul29.151151.28025@eecs.nwu.edu> <1992Jul30.020100.640@uunet.uu.net>
- Date: Thu, 30 Jul 1992 17:40:29 GMT
- Lines: 66
-
- In article <1992Jul30.020100.640@uunet.uu.net> ziegast@godzilla.UU.NET (Eric W. Ziegast) writes:
- |phil@eecs.nwu.edu (William LeFebvre) writes:
- ||> I have noticed that quite a few of the maps now posted in comp.mail.maps
- ||> contain as the first line "file {...}" with the file name contained in
- ||> the curly braces. This is the first line in the file AFTER extraction
- ||> with sh.
- ||>
- ||> Why are they there?
-
- |Many people do something silimilar to the following when
- |rebuildiung UUCP alias tables:
-
- | cat uumap/u.* | some filters | pathalias | ...etc...
-
- |If there's an error, pathalias would say something like:
-
- | "line 56437: syntax error"
-
- |It's very hard to track down. If one uses the "file" line at the top of
- |all of their files, they would more likely see:
-
- | "u.usa.va.2", line 74: syntax error
-
- Another approach is to have the prefilter into pathalias do it. In
- shell, it's something like this:
-
- for i in uumap/u.*
- do
- echo "file {`basename $i}`"
- cat $i
- done | pathalias ....
-
- But this is rather inefficient. Especially if the maps (or worse, some of the maps)
- are compressed:
-
- for i in uumap/u.*
- do
- echo "file {`basename $i .Z`}"
- case $i in
- *.Z)
- zcat $i
- ;;
- *)
- cat $i
- ;;
- esac
- done | pathalias ....
-
- The new version of unpackmaps (unpackmaps 4.0b) inserts the file directive
- automatically - in a considerably more efficient manner than the fragment above -
- it's all implemented in C, with a built-in decompress). But now that the UUCP
- project is doing this themselves, you can turn this "feature" off - or not -
- it doesn't hurt or cost anything in terms of performance. Is still convenient
- for making sure that local map overrides get reported properly even if you
- forget to put the file directive in.
-
- There are other reasons for upgrading to pathalias 10 than just the "file"
- directive. Pathalias 9 has a tendency to go into infinite CPU loops
- with certain combinations of maps and initial "root" point.
-
- |It's much easier to track down the error when you know what file it's
- |in.
-
- Sure is. This is why I suggested the "file" directive to Peter Honeyman
- several years ago - it's just taken til now for the UUCP map project
- to get around to using it.
-