projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
521f073
)
movefile: handle EEXIST when os.symlink fails
author
Zac Medico
<zmedico@gentoo.org>
Sun, 15 May 2011 04:39:26 +0000
(21:39 -0700)
committer
Zac Medico
<zmedico@gentoo.org>
Sun, 15 May 2011 04:39:26 +0000
(21:39 -0700)
pym/portage/util/movefile.py
patch
|
blob
|
history
diff --git
a/pym/portage/util/movefile.py
b/pym/portage/util/movefile.py
index f8cc695fb6d6b11a5c2b4663ad684b31ed6b5ba0..e07e8ca4f7eca5d371780ab0cd764c4861d4a245 100644
(file)
--- a/
pym/portage/util/movefile.py
+++ b/
pym/portage/util/movefile.py
@@
-90,7
+90,8
@@
def movefile(src, dest, newmtime=None, sstat=None, mysettings=None,
# to tolerate these links being recreated during the merge
# process. In any case, if the link is pointing at the right
# place, we're in good shape.
- if e.errno != errno.ENOENT or target != os.readlink(dest):
+ if e.errno not in (errno.ENOENT, errno.EEXIST) or \
+ target != os.readlink(dest):
raise
lchown(dest,sstat[stat.ST_UID],sstat[stat.ST_GID])
# utime() only works on the target of a symlink, so it's not