autoconf-commit
[Top][All Lists]
Advanced

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

[SCM] GNU Autoconf source repository branch, master, updated. v2.63-235-


From: Eric Blake
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.63-235-gfd651ae
Date: Thu, 04 Dec 2008 13:29:55 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=fd651ae835b1b7a354bf4cd3d4b2fc0bab17656a

The branch, master has been updated
       via  fd651ae835b1b7a354bf4cd3d4b2fc0bab17656a (commit)
      from  af7366502f5d298e63bc02ca4516186b8acf7f6c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit fd651ae835b1b7a354bf4cd3d4b2fc0bab17656a
Author: Eric Blake <address@hidden>
Date:   Tue Dec 2 11:51:44 2008 -0700

    Improve AC_STATE_SAVE.
    
    * tests/local.at (AC_STATE_SAVE): Avoid ls -1, and use one less
    process by hoisting the uniqueness check into sed.
    * doc/autoconf.texi (Limitations of Usual Tools) <ls>: Mention
    MacOS bug.
    
    Signed-off-by: Eric Blake <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog         |    8 ++++++++
 doc/autoconf.texi |   10 ++++++++++
 tests/local.at    |   20 +++++++++++++++++---
 3 files changed, 35 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7ca53e9..cd343d8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-12-03  Eric Blake  <address@hidden>
+
+       Improve AC_STATE_SAVE.
+       * tests/local.at (AC_STATE_SAVE): Avoid ls -1, and use one less
+       process by hoisting the uniqueness check into sed.
+       * doc/autoconf.texi (Limitations of Usual Tools) <ls>: Mention
+       MacOS bug.
+
 2008-12-02  Eric Blake  <address@hidden>
 
        Avoid MacOS readdir bug in testsuite.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 1decd4b..fe28f39 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -16575,6 +16575,16 @@ was equivalent to @samp{sources='*.c not found'} in 
the absence of
 @samp{.c} files.  This is no longer a practical problem, since current
 @command{ls} implementations send diagnostics to standard error.
 
+The behavior of @command{ls} on a directory that is being concurrently
+modified is not always predictable, because of a data race where cached
+information returned by @code{readdir} does not match the current
+directory state.  In fact, MacOS 10.5 has an intermittent bug where
address@hidden, and thus @command{ls}, sometimes lists a file more than
+once if other files were added or removed from the directory immediately
+prior to the @command{ls} call.  Since @command{ls} already sorts its
+output, the duplicate entries can be avoided by piping the results
+through @code{uniq}.
+
 @anchor{mkdir}
 @item @command{mkdir}
 @c ------------------
diff --git a/tests/local.at b/tests/local.at
index 2ec7bc5..ba81e7c 100644
--- a/tests/local.at
+++ b/tests/local.at
@@ -197,11 +197,25 @@ m4_define([AT_CONFIGURE_AC],
 # confirm that no test modifies variables outside the Autoconf namespace or
 # leaves temporary files.  AT_CONFIG_CMP uses the variable dumps to confirm 
that
 # tests have the same side effects regardless of caching.
-# The sort -u is necessary, since MacOS 10.5 has a bug where readdir can
-# list a file multiple times in a rapidly changing directory.
+#
+# The sed script duplicates uniq functionality (thanks to 'info sed
+# uniq' for the recipe), in order to avoid a MacOS 10.5 bug where
+# readdir can list a file multiple times in a rapidly changing
+# directory, while avoiding yet another fork.
 m4_defun([AC_STATE_SAVE],
 [(set) 2>&1 | sort >state-env.$][1
-ls -1 | sed '/^at-/d;/^state-/d;/^config\./d' | sort -u >state-ls.$][1
+ls | sed '/^at-/d;/^state-/d;/^config\./d
+  h
+  :b
+  $b
+  N
+  /^\(.*\)\n\1$/ {
+    g
+    bb
+  }
+  $b
+  P
+  D' >state-ls.$][1
 ])# AC_STATE_SAVE
 ]])
 


hooks/post-receive
--
GNU Autoconf source repository




reply via email to

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