]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
install-sh: do not chown existing directories.
authorKarl Berry <karl@freefriends.org>
Wed, 11 Nov 2020 01:54:06 +0000 (17:54 -0800)
committerKarl Berry <karl@freefriends.org>
Wed, 11 Nov 2020 01:54:06 +0000 (17:54 -0800)
* lib/install-sh: do not chown existing directories.
Original patch sent by Julien Elie:
https://lists.gnu.org/archive/html/automake-patches/2018-03/msg00003.html
(scriptversion): 2020-11-11.01
* NEWS: mention this.

NEWS
lib/install-sh

diff --git a/NEWS b/NEWS
index c7d02d606c19eb747165c8ad8be7e25f40a758d8..f4445f9c5692352d79842eb703194827267e650a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -92,8 +92,8 @@ New in ?.?.?:
 
 * Miscellaneous changes
 
-  - install-sh no longer unconditionally uses -f when rm is overridden
-  by RMPROG.
+  - install-sh tweaks: no longer unconditionally uses -f when rm is
+  overridden by RMPROG; does not chown existing directories.
 
   - Removed function up_to_date_p in lib/Automake/FileUtils.pm.
     We believe this function is completely unused.
index 2915ff0158366366ed7eb5dd87131b7cca547000..4fe135050cc261b301c4f25f9e95ad127c784e8f 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2020-07-26.22; # UTC
+scriptversion=2020-11-11.01; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -262,6 +262,10 @@ do
     dstdir=$dst
     test -d "$dstdir"
     dstdir_status=$?
+    # Don't chown directories that already exist.
+    if test $dstdir_status = 0; then
+      chowncmd=""
+    fi
   else
 
     # Waiting for this to be detected by the "$cpprog $src $dsttmp" command