autoconf-patches
[Top][All Lists]
Advanced

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

FreeBSD /bin/sh 'set' bug


From: Ralf Wildenhues
Subject: FreeBSD /bin/sh 'set' bug
Date: Thu, 27 Apr 2006 18:59:19 +0200
User-agent: Mutt/1.5.11

[ upstream report: http://www.freebsd.org/cgi/query-pr.cgi?pr=96415 ]

I overlooked that my earlier FreeBSD 5.4 test chose /usr/local/bin/bash
as shell.  Well,
  /bin/sh -c 'set'

does not sort its output (both 5.4 and 6.0); actually, the output order
isn't very stable at all.  This makes hundreds of tests fail, and also
causes unsorted config.cache, thus needlessly updated cache files.

OK to apply this patch?  With it, FreeBSD 5.4 has no failures.  
The FreeBSD 6.0 I verified this on was the testdrive box, thus needs the
locking bug fixed before useful testing can be done there.

Cheers,
Ralf

        * doc/autoconf.texi (Limitations of Builtins): Document FreeBSD
        /bin/sh set unsorted output.
        * lib/autoconf/general.m4 (_AC_CACHE_DUMP): Adjust.
        * tests/local.at

Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.1001
diff -u -r1.1001 autoconf.texi
--- doc/autoconf.texi   26 Apr 2006 20:30:55 -0000      1.1001
+++ doc/autoconf.texi   27 Apr 2006 16:33:34 -0000
@@ -12165,6 +12318,9 @@
 set -ex
 @end example
 
+The @command{set} of the address@hidden 6.0 shell does not sort its
+output.
+
 
 @item @command{shift}
 @c ------------------
Index: lib/autoconf/general.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/general.m4,v
retrieving revision 1.912
diff -u -r1.912 general.m4
--- lib/autoconf/general.m4     24 Apr 2006 19:36:02 -0000      1.912
+++ lib/autoconf/general.m4     27 Apr 2006 16:33:34 -0000
@@ -1853,7 +1853,7 @@
       sed -n ["/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"]
       ;;
     esac
-)dnl
+) | sort dnl
 ])# _AC_CACHE_DUMP
 
 
Index: tests/local.at
===================================================================
RCS file: /cvsroot/autoconf/autoconf/tests/local.at,v
retrieving revision 1.29
diff -u -r1.29 local.at
--- tests/local.at      19 Apr 2006 04:13:48 -0000      1.29
+++ tests/local.at      27 Apr 2006 16:37:41 -0000
@@ -181,7 +181,7 @@
 # leaves temporary files.  AT_CONFIG_CMP uses the variable dumps to confirm 
that
 # tests have the same side effects regardless of caching.
 m4_defun([AC_STATE_SAVE],
-[(set) >state-env.$][1 2>&1
+[(set) 2>&1 | sort >state-env.$][1
 ls -1 | sed '/^at-/d;/^state-/d;/^config\./d' | sort >state-ls.$][1
 ])# AC_STATE_SAVE
 ]])




reply via email to

[Prev in Thread] Current Thread [Next in Thread]