summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-03-16 18:11:46 +0000
committerZac Medico <zmedico@gentoo.org>2007-03-16 18:11:46 +0000
commit68222f834c6f872cc5b38462e2c399e8e3297123 (patch)
treeabdcf8f049a798033c4928161b1d1a4e7bc55945 /pym
parente6c72375397e0a3f40f3a3be2f6745dc9539d746 (diff)
downloadportage-68222f834c6f872cc5b38462e2c399e8e3297123.tar.gz
portage-68222f834c6f872cc5b38462e2c399e8e3297123.tar.bz2
portage-68222f834c6f872cc5b38462e2c399e8e3297123.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.
svn path=/main/trunk/; revision=6215
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/dbapi/vartree.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index a4c7737d5..17ca0e390 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -1494,8 +1494,14 @@ class dblink(object):
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 = []