On Mon, 26 Feb 2007, Sam Vilain wrote:
> Rafael Garcia-Suarez wrote:
> > [rafael profane threadperl]$ ./perl -Ilib
-V:myuname
> > myuname='freebsd profane.mongueurs.net 6.0-stable
freebsd 6.0-stable
> > #5: fri feb 24 11:12:56 cet 2006
> > root profane.mongueurs.net:usrobjusrsrcsysprofane i386 ';
> > [rafael profane threadperl]$ uname -a
> > FreeBSD profane.mongueurs.net 6.0-STABLE FreeBSD
6.0-STABLE #5: Fri
> > Feb 24 11:12:56 CET 2006
> > root profane.mongueurs.net:/usr/obj/usr/src/sys/PROFANE
i386
> >
> > Just being curious, why does Configure remove
slashes from the output
> > of uname -a ?
Paranoia, I expect. The only real purpose of the 'myuname'
variable is to
test whether an existing config.sh was built on the same
system as the one
currently running Configure. The variable has to be safe to
use
as an argument for various shell built-in commands and safe
to pass as a
pattern to 'grep'.
Offhand, I don't see any reason to remove the slashes.
> > That happens on line 3005 :
> >
> > myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e
's////g' |
> > ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
> That particular line was added between 5a9 and 5.0;
'git-annotate' on
> Configure told me that much[1]. Looking at the
patch-ified version of
> that change[2], I spotted these lines that were added
to this mysterious
> file "U/Oldconfig.U", which was removed by
5.0;
That line comes from the 'dist' package, which is used to
generate
Configure. That particular line came in patch16 to dist-3.0
(dated
1994/01/24). I merged dist-3.0 into perl5 shortly after
perl5alpha7, so
that's probably when it would show up in the perl archives.
> +?X: Special mention for Xenix, whose 'uname -a' gives
us output like this:
> +?X: sysname=XENIX
> +?X: nodename=whatever
> +?X: release=2.3.2 .. etc...
> +?X: Therefore, we strip all this variable assignment
junk and remove
> all the
> +?X: new lines to keep the myuname variable sane...
--RAM
> +myuname=`echo $myuname | $sed -e 's/^[^=]*=//' |
> + tr '[A-Z]' '[a-z]' | tr ' 12' ' '`
> Coincidentally this is the period of history that Andy
pointed out there
> are those extra revisions for; I'll graft them in and
see if there's
> anything more useful there.
I suspect you won't find anything useful there. The RCS log
is in the
Oldconfig.U unit in the metaconfig branch in the perforce
repository,
(which is where I got the patch16 reference) but it doesn't
tell you
anything more.
--
Andy Dougherty doughera lafayette.edu
|