summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-11-26 21:59:51 +0000
committerZac Medico <zmedico@gentoo.org>2009-11-26 21:59:51 +0000
commitdb47cf762436803aadaa8ed909a6fd1b3390f629 (patch)
tree6a2118adb3ef5a1e0bcfe2c1412373305daad57a
parent60ebc4a1b1a94e89606af416f6da7e05f3d13b94 (diff)
downloadportage-db47cf762436803aadaa8ed909a6fd1b3390f629.tar.gz
portage-db47cf762436803aadaa8ed909a6fd1b3390f629.tar.bz2
portage-db47cf762436803aadaa8ed909a6fd1b3390f629.zip
In movefile(), skip os.utime() when os.rename() succeeds, in order to
completely preserve mtime resolution. svn path=/main/trunk/; revision=14897
-rw-r--r--pym/portage/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 2641472e5..3246a3a51 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -7565,6 +7565,8 @@ def movefile(src, dest, newmtime=None, sstat=None, mysettings=None,
try:
if hardlinked:
newmtime = long(os.stat(dest).st_mtime)
+ elif not renamefailed:
+ newmtime = long(sstat.st_mtime)
else:
if newmtime is not None:
os.utime(dest, (newmtime, newmtime))