summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-03-16 18:12:21 +0000
committerZac Medico <zmedico@gentoo.org>2007-03-16 18:12:21 +0000
commit5cd387135bf3a8fed2b6ce0ddc971dce338c1447 (patch)
treea8abcbc9db1d406f469a7003e258f91bce9384e6 /pym
parent7ec1629e54531e31ca4d8e4a22b0115cfd1cd5d8 (diff)
downloadportage-5cd387135bf3a8fed2b6ce0ddc971dce338c1447.tar.gz
portage-5cd387135bf3a8fed2b6ce0ddc971dce338c1447.tar.bz2
portage-5cd387135bf3a8fed2b6ce0ddc971dce338c1447.zip
For bug #171117, ensure that the new and old config have different timestamps (for the benefit of programs like rsync that need distiguishable timestamps to detect file changes). Thanks to Ben Bennett <sink@limey.net> for reporting. (trunk r6214:6215)
svn path=/main/branches/2.1.2/; revision=6216
Diffstat (limited to 'pym')
-rw-r--r--pym/portage.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/pym/portage.py b/pym/portage.py
index c977637ec..9661c72fe 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -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 = []