summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-06-06 03:37:11 +0000
committerZac Medico <zmedico@gentoo.org>2007-06-06 03:37:11 +0000
commit65764654946644f5c0b36ca106e79e097fcba44d (patch)
tree2d0a7628622043608ca2345ea841fc47f0c9e5ee /pym
parent74fe0fbfd2325120fdd4bb8165d70732b1767399 (diff)
downloadportage-65764654946644f5c0b36ca106e79e097fcba44d.tar.gz
portage-65764654946644f5c0b36ca106e79e097fcba44d.tar.bz2
portage-65764654946644f5c0b36ca106e79e097fcba44d.zip
Comment in portage.movefile() that it's impossible to preserve timestamps of a symlink since utime() only works on the target.
svn path=/main/trunk/; revision=6740
Diffstat (limited to 'pym')
-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 db268e5fd..901e25875 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -3971,6 +3971,8 @@ def movefile(src,dest,newmtime=None,sstat=None,mysettings=None):
else:
os.symlink(target,dest)
lchown(dest,sstat[stat.ST_UID],sstat[stat.ST_GID])
+ # utime() only works on the target of a symlink, so it's not
+ # possible to perserve mtime on symlinks.
return os.lstat(dest)[stat.ST_MTIME]
except SystemExit, e:
raise