summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-06-15 22:40:42 +0000
committerZac Medico <zmedico@gentoo.org>2007-06-15 22:40:42 +0000
commit4d5039da85d5fa1422c5c4dfb944c6fbb1006ab6 (patch)
treec3bd2483b44b2339e513ad92bf22b4c6d7d44ac1 /pym
parent95e52479f8df936e9168e7e567bc5c2725f6caea (diff)
downloadportage-4d5039da85d5fa1422c5c4dfb944c6fbb1006ab6.tar.gz
portage-4d5039da85d5fa1422c5c4dfb944c6fbb1006ab6.tar.bz2
portage-4d5039da85d5fa1422c5c4dfb944c6fbb1006ab6.zip
Make the collision-protect loop check for existance of the destination file before checking if it's owned. (trunk r6858)
svn path=/main/branches/2.1.2/; revision=6859
Diffstat (limited to 'pym')
-rw-r--r--pym/portage.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 31de417f1..fce0c27e3 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -7429,6 +7429,15 @@ class dblink:
i=i+1
if i % 1000 == 0:
print str(i)+" files checked ..."
+ dest_path = normalize_path(
+ os.path.join(destroot, f.lstrip(os.path.sep)))
+ try:
+ dest_lstat = os.lstat(dest_path)
+ except EnvironmentError, e:
+ if e.errno != errno.ENOENT:
+ raise
+ del e
+ continue
if f[0] != "/":
f="/"+f
isowned = False