From 4d5039da85d5fa1422c5c4dfb944c6fbb1006ab6 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 15 Jun 2007 22:40:42 +0000 Subject: 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 --- pym/portage.py | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -- cgit v1.2.3-1-g7c22