From 8ecd48c6dfb08da5830a303ea8c99a1ff0997932 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 15 Jun 2007 22:39:58 +0000 Subject: Make the collision-protect loop check for existance of the destination file before checking if it's owned. svn path=/main/trunk/; revision=6858 --- pym/portage/dbapi/vartree.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'pym') 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 -- cgit v1.2.3-1-g7c22