Make the collision-protect loop check for existance of the destination file before...
authorZac Medico <zmedico@gentoo.org>
Fri, 15 Jun 2007 22:40:42 +0000 (22:40 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 15 Jun 2007 22:40:42 +0000 (22:40 -0000)
svn path=/main/branches/2.1.2/; revision=6859

pym/portage.py

index 31de417f1ac8a93541601da706a6fadc53f2e8d5..fce0c27e392335ce3382391ada79222aa12b25a5 100644 (file)
@@ -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