summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-06-15 22:39:58 +0000
committerZac Medico <zmedico@gentoo.org>2007-06-15 22:39:58 +0000
commit8ecd48c6dfb08da5830a303ea8c99a1ff0997932 (patch)
treebee3d585034bd1dc8141cd7d4a98d5d821a902b5
parent63f59d7ee1f8264cbca178f3d1f0b94fa4e14f44 (diff)
downloadportage-8ecd48c6dfb08da5830a303ea8c99a1ff0997932.tar.gz
portage-8ecd48c6dfb08da5830a303ea8c99a1ff0997932.tar.bz2
portage-8ecd48c6dfb08da5830a303ea8c99a1ff0997932.zip
Make the collision-protect loop check for existance of the destination file before checking if it's owned.
svn path=/main/trunk/; revision=6858
-rw-r--r--pym/portage/dbapi/vartree.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 5e397f099..5affc5f07 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -1415,6 +1415,15 @@ class dblink(object):
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