From: Karl Berry Date: Wed, 11 Nov 2020 01:54:06 +0000 (-0800) Subject: install-sh: do not chown existing directories. X-Git-Tag: v1.16.3~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6b182dc52eff16ad583f9251fd1a6888f8d9fc2f;p=thirdparty%2Fautomake.git install-sh: do not chown existing directories. * 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. --- diff --git a/NEWS b/NEWS index c7d02d606..f4445f9c5 100644 --- 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. diff --git a/lib/install-sh b/lib/install-sh index 2915ff015..4fe135050 100755 --- a/lib/install-sh +++ b/lib/install-sh @@ -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