Only unlink .installed after the collision-protect has completed successfully (report...
authorZac Medico <zmedico@gentoo.org>
Tue, 10 Oct 2006 11:03:25 +0000 (11:03 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 10 Oct 2006 11:03:25 +0000 (11:03 -0000)
svn path=/main/trunk/; revision=4648

pym/portage.py

index b66486fb7ebecc0530b32f46cc30bf9d255c944e..1aa41ae885585d188cada4e5ba0b157b2b0519a0 100644 (file)
@@ -5978,17 +5978,6 @@ class dblink:
                # This blocks until we can get the dirs to ourselves.
                self.lockdb()
 
-               if os.stat(srcroot).st_dev == os.stat(destroot).st_dev:
-                       """ The merge process may move files out of the image directory,
-                       which causes invalidation of the .installed flag."""
-                       try:
-                               os.unlink(os.path.join(
-                                       os.path.dirname(normalize_path(srcroot)), ".installed"))
-                       except OSError, e:
-                               if e.errno != errno.ENOENT:
-                                       raise
-                               del e
-
                otherversions=[]
                for v in self.vartree.dbapi.cp_list(self.mysplit[0]):
                        otherversions.append(v.split("/")[1])
@@ -6078,6 +6067,16 @@ class dblink:
                        except:
                                pass
 
+               if os.stat(srcroot).st_dev == os.stat(destroot).st_dev:
+                       """ The merge process may move files out of the image directory,
+                       which causes invalidation of the .installed flag."""
+                       try:
+                               os.unlink(os.path.join(
+                                       os.path.dirname(normalize_path(srcroot)), ".installed"))
+                       except OSError, e:
+                               if e.errno != errno.ENOENT:
+                                       raise
+                               del e
 
                # get old contents info for later unmerging
                oldcontents = self.getcontents()