For bug #188559, invalidate dblink._contents_inodes as necessary to prevent FEATURES...
authorZac Medico <zmedico@gentoo.org>
Sun, 12 Aug 2007 11:43:27 +0000 (11:43 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 12 Aug 2007 11:43:27 +0000 (11:43 -0000)
svn path=/main/trunk/; revision=7591

pym/portage/dbapi/vartree.py

index 92f48337e8e774786aada5ab4ab32e348a3cb0e6..d112c84e8f0cdf4a0965269f0223bdcaaa0c0c1b 100644 (file)
@@ -1802,7 +1802,13 @@ class dblink(object):
                        if dblnk.mycpv != self.mycpv:
                                continue
                        writemsg_stdout(">>> Safely unmerging already-installed instance...\n")
+                       # These caches are populated during collision-protect and the data
+                       # they contain is now invalid. It's very important to invalidate
+                       # the contents_inodes cache so that FEATURES=unmerge-orphans
+                       # doesn't unmerge anything that belongs to this package that has
+                       # just been merged.
                        self.contentscache = None
+                       self._contents_inodes = None
                        others_in_slot.append(self)  # self has just been merged
                        others_in_slot.remove(dblnk) # dblnk will unmerge itself now
                        dblnk.unmerge(trimworld=0, ldpath_mtimes=prev_mtimes,