Make the merge phase automatically invalidate the ${PORTAGE_BUILDDIR}/.installed...
authorZac Medico <zmedico@gentoo.org>
Sun, 8 Oct 2006 22:14:47 +0000 (22:14 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 8 Oct 2006 22:14:47 +0000 (22:14 -0000)
svn path=/main/trunk/; revision=4622

pym/portage.py

index fff0740356732d3de99c0a72498ec96646384261..3fd1dc33742d7685bcbc00b6f32c12aa49a4e0d1 100644 (file)
@@ -6029,6 +6029,16 @@ class dblink:
                # This blocks until we can get the dirs to ourselves.
                self.lockdb()
 
+               try:
+                       """ The merge process may move files out of the image directory,
+                       which causes invalidation of the .installed flag."""
+                       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])