For bug #171117, ensure that the new and old config have different timestamps (for...
authorZac Medico <zmedico@gentoo.org>
Fri, 16 Mar 2007 18:12:21 +0000 (18:12 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 16 Mar 2007 18:12:21 +0000 (18:12 -0000)
svn path=/main/branches/2.1.2/; revision=6216

pym/portage.py

index c977637ec7eb26201c23e580ab0895c951e3d04a..9661c72fe8805fa9c21152e0fcd0b922b116ef1d 100644 (file)
@@ -7420,8 +7420,14 @@ class dblink:
                else:
                        cfgfiledict["IGNORE"]=0
 
+               # Timestamp for files being merged.  Use time() - 1 in order to prevent
+               # a collision with timestamps that are bumped by the utime() call
+               # inside isprotected().  This ensures that the new and old config have
+               # different timestamps (for the benefit of programs like rsync that
+               # that need distiguishable timestamps to detect file changes).
+               mymtime = long(time.time() - 1)
+
                # set umask to 0 for merging; back up umask, save old one in prevmask (since this is a global change)
-               mymtime    = long(time.time())
                prevmask   = os.umask(0)
                secondhand = []