[PATCH] install-sh: prevent existing directories from being chown'ed

Julien ÉLIE <[email protected]>
Newsgroups gmane.comp.sysutils.automake.patches
Organization TrigoFACILE -- http://www.trigofacile.com/
Message-ID <[email protected]>
Hi,

I don't know whether it is still worth having, but I submit it in case
you would be interested.  We occasionally encountered errors on a few systems
when trying to change ownership of existing directories.
  https://inn.eyrie.org/trac/changeset/6882

-- 
Julien ÉLIE



* lib/install-sh: Prevent existing directories from being chown'ed

--- install-sh.orig	2018-03-17 14:18:08.701045461 +0100
+++ install-sh.useless-chown	2018-03-17 14:29:16.924781085 +0100
@@ -255,6 +255,10 @@
     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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.