[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU Autoconf source repository branch, master, updated. v2.67-40-g
From: |
Ralf Wildenhues |
Subject: |
[SCM] GNU Autoconf source repository branch, master, updated. v2.67-40-ge9cceec |
Date: |
Fri, 27 Aug 2010 17:51:39 +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=e9cceec734dafd433b7038228fe4cf80f7adf5fb
The branch, master has been updated
via e9cceec734dafd433b7038228fe4cf80f7adf5fb (commit)
from 55f532e539427ff5829790fd71b6f8c6342b141a (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 e9cceec734dafd433b7038228fe4cf80f7adf5fb
Author: Ralf Wildenhues <address@hidden>
Date: Sat Aug 14 08:34:01 2010 +0200
Try to update config.cache atomically; respect symlinks.
* lib/autoconf/general.m4 (AC_CACHE_SAVE): Use `mv -f' to update
the cache file if it is a regular file and not a symlink. Move
first to temporary name in the target directory if not in the
current directory for atomicity across mount points.
* tests/base.at (AC_CACHE_CHECK): Try symlinked cache file.
* doc/autoconf.texi (Cache Files): Leftover temporary cache
files may be deleted by the user.
* NEWS: Update.
Signed-off-by: Ralf Wildenhues <address@hidden>
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 12 ++++++++++++
NEWS | 5 +++++
doc/autoconf.texi | 6 ++++++
lib/autoconf/general.m4 | 17 +++++++++++++++--
tests/base.at | 9 +++++++++
5 files changed, 47 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 5a11ab3..0230867 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2010-08-27 Ralf Wildenhues <address@hidden>
+
+ Try to update config.cache atomically; respect symlinks.
+ * lib/autoconf/general.m4 (AC_CACHE_SAVE): Use `mv -f' to update
+ the cache file if it is a regular file and not a symlink. Move
+ first to temporary name in the target directory if not in the
+ current directory for atomicity across mount points.
+ * tests/base.at (AC_CACHE_CHECK): Try symlinked cache file.
+ * doc/autoconf.texi (Cache Files): Leftover temporary cache
+ files may be deleted by the user.
+ * NEWS: Update.
+
2010-08-27 Eric Blake <address@hidden>
m4sh: protect LINENO against stray macro
diff --git a/NEWS b/NEWS
index 6010e7b..79ed028 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,11 @@ GNU Autoconf NEWS - User visible changes.
** The macro m4_define_default is now documented.
+** Symlinked config.cache files are supported; configure now tries to
+ update non-symlinked cache files atomically, so that concurrent configure
+ runs do not leave behind broken cache files. It is still unspecified
+ which subset or union of results is cached though.
+
* Major changes in Autoconf 2.67 (2010-07-21) [stable]
Released by Eric Blake, based on git versions 2.66.*.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 95500be..19f00bd 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -9809,6 +9809,12 @@ results with the existing cache file.) This may cause
problems,
however, if the system configuration (e.g., the installed libraries or
compilers) changes and the stale cache file is not deleted.
+If @command{configure} is interrupted at the right time when it updates
+a cache file outside of the build directory where the @command{configure}
+script is run, it may leave behind a temporary file named after the
+cache file with digits following it. You may safely delete such a file.
+
+
@node Cache Checkpointing
@subsection Cache Checkpointing
diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4
index c6f3980..1410921 100644
--- a/lib/autoconf/general.m4
+++ b/lib/autoconf/general.m4
@@ -2001,9 +2001,22 @@ _AC_CACHE_DUMP() |
:end'] >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
- test "x$cache_file" != "x/dev/null" &&
+ if test "x$cache_file" != "x/dev/null"; then
AC_MSG_NOTICE([updating cache $cache_file])
- cat confcache >$cache_file
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+dnl Try to update the cache file atomically even on different mount points;
+dnl at the same time, avoid filename limitation issues in the common case.
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
else
AC_MSG_NOTICE([not updating unwritable cache $cache_file])
fi
diff --git a/tests/base.at b/tests/base.at
index f21e777..cf12099 100644
--- a/tests/base.at
+++ b/tests/base.at
@@ -457,6 +457,15 @@ AT_CHECK_CONFIGURE([], [], [stdout])
AT_CHECK([grep cache stdout], [1])
AT_CHECK([LC_ALL=C ls -t config.cache a-stamp-file | sed 1q | grep
config.cache], [1])
+# Using a symlinked cache file works.
+: > cache
+rm -f config.cache
+AS_LN_S([cache], [config.cache])
+AT_CHECK_CONFIGURE([-C])
+# Either the system does not support symlinks, or the symlinked-to file
+# should be updated.
+AT_CHECK([test -s cache || test ! -h config.cache])
+
# config.site can specify a site-wide cache, accumulating information.
# Also test that we don't run afoul of sourcing a file with leading -.
AT_DATA([-config.site],
hooks/post-receive
--
GNU Autoconf source repository
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU Autoconf source repository branch, master, updated. v2.67-40-ge9cceec,
Ralf Wildenhues <=