]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autotest/general.m4 (AT_INIT): When ensuring writability
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Wed, 11 Jan 2006 08:33:16 +0000 (08:33 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Wed, 11 Jan 2006 08:33:16 +0000 (08:33 +0000)
before the removals of test dirs, use `find' to avoid modification
of symlinked directories.

ChangeLog
lib/autotest/general.m4

index 2aff272414c44718ea6f60f4e81fd9514461c749..794d00119e1c739a7ee6a5f13adbd8e5a8eb056e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-01-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+           Stepan Kasal  <kasal@ucw.cz>
+
+       * lib/autotest/general.m4 (AT_INIT): When ensuring writability
+       before the removals of test dirs, use `find' to avoid modification
+       of symlinked directories.
+
 2006-01-11  Steven G. Johnson  <stevenj@alum.mit.edu>
 
        * lib/autoconf/fortran.m4 (AC_F77_DUMMY_MAIN, AC_FC_DUMMY_MAIN):
index f40cbf8adca25f58f22f1f80d67fa2c186151667..407dd11016276f05cd0c0b7e67b7a26ef894b064 100644 (file)
@@ -276,7 +276,8 @@ do
        ;;
 
     --clean | -c )
-       test -d "$at_suite_dir" && chmod -R u+rwx "$at_suite_dir"
+       test -d "$at_suite_dir" &&
+         find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
        rm -f -r "$at_suite_dir" "$at_suite_log"
        exit 0
        ;;
@@ -670,8 +671,10 @@ do
       # Create a fresh directory for the next test group, and enter.
       at_group_dir=$at_suite_dir/$at_group_normalized
       at_group_log=$at_group_dir/$as_me.log
-      test -d $at_group_dir && chmod -R u+rwx $at_group_dir
-      rm -f -r $at_group_dir
+      if test -d $at_group_dir; then
+       find $at_group_dir -type d ! -perm -700 -exec chmod u+rwx \{\} \;
+       rm -fr $at_group_dir
+      fi
       mkdir $at_group_dir ||
        AS_ERROR([cannot create $at_group_dir])
       cd $at_group_dir
@@ -764,10 +767,11 @@ _ATEOF
          echo "$at_log_msg" >&AS_MESSAGE_LOG_FD
 
          # Cleanup the group directory, unless the user wants the files.
-         $at_debug_p || {
-           test -d $at_group_dir && chmod -R u+rwx $at_group_dir
-           rm -f -r $at_group_dir
-         }
+         $at_debug_p ||
+           if test -d $at_group_dir; then
+             find $at_group_dir -type d ! -perm -700 -exec chmod u+rwx \{\} \;
+             rm -fr $at_group_dir
+           fi
          ;;
        *)
          # Upon failure, include the log into the testsuite's global