[Fai-commit] r6228 - branches/experimental/patches

Michael Tautschnig mt at alioth.debian.org
Sat Dec 4 09:52:00 UTC 2010


Author: mt
Date: 2010-12-04 09:51:59 +0000 (Sat, 04 Dec 2010)
New Revision: 6228

Added:
   branches/experimental/patches/fcopy-unchanged-uid-gid
Modified:
   branches/experimental/patches/series
Log:
Added (modified) fcopy patch as posted on linux-fai-devel by Sabine Schmidt.


Added: branches/experimental/patches/fcopy-unchanged-uid-gid
===================================================================
--- branches/experimental/patches/fcopy-unchanged-uid-gid	                        (rev 0)
+++ branches/experimental/patches/fcopy-unchanged-uid-gid	2010-12-04 09:51:59 UTC (rev 6228)
@@ -0,0 +1,22 @@
+2010-12-04  Michael Tautschnig  <mt at debian.org>
+
+	* fcopy: Write file mode and uid/gid only if actually different (thanks Sabine
+		Schmidt <sabine.schmidt at desy.de> for the initial patch).
+Index: trunk/bin/fcopy
+===================================================================
+--- trunk.orig/bin/fcopy
++++ trunk/bin/fcopy	
+@@ -314,6 +314,13 @@
+   # get mtime,uid,gid,mode from source file
+   my ($stime, at defmodes) = (stat("$sourcefile/$class"))[9,4,5,2];
+ 
++  # get mtime,uid,gid,mode from destination file
++  my ($dtime, at ddefmodes) = (stat("$destfile"))[9,4,5,2];
++  # compare time,uid,gid and mode of source file and target file
++  # if different: change the values
++  return if ($stime == $dtime && (($ddefmodes[0] == $defmodes[0]) &&
++      ($ddefmodes[1] == $defmodes[1]) && ($ddefmodes[2] == $defmodes[2])));
++
+   if ($modeset) { # use -m values
+     ($owner,$group,$mode) = @opt_modes;
+   } elsif (-f "$sourcefile/file-modes"){

Modified: branches/experimental/patches/series
===================================================================
--- branches/experimental/patches/series	2010-12-03 22:22:15 UTC (rev 6227)
+++ branches/experimental/patches/series	2010-12-04 09:51:59 UTC (rev 6228)
@@ -24,3 +24,4 @@
 setup-storage_pvcreate-old-lvm
 setup-storage_hardcode-63-sectors
 setup-storage_no-decimal
+fcopy-unchanged-uid-gid




More information about the Fai-commit mailing list