summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-08-12 11:43:59 +0000
committerZac Medico <zmedico@gentoo.org>2007-08-12 11:43:59 +0000
commit0361d498fa8aa7e9366c1abd601a8fd4464b1e5b (patch)
tree557f70478af28ac12759e00160626388447f4313 /pym
parent0ab2f73acbe60e3b0a8d2f1834eff1630d5f8c75 (diff)
downloadportage-0361d498fa8aa7e9366c1abd601a8fd4464b1e5b.tar.gz
portage-0361d498fa8aa7e9366c1abd601a8fd4464b1e5b.tar.bz2
portage-0361d498fa8aa7e9366c1abd601a8fd4464b1e5b.zip
For bug #188559, invalidate dblink._contents_inodes as necessary to prevent FEATURES=unmerge-orphans from unmerging anything that belongs to the package that has just been merged. (trunk r7591)
svn path=/main/branches/2.1.2/; revision=7592
Diffstat (limited to 'pym')
-rw-r--r--pym/portage.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pym/portage.py b/pym/portage.py
index e8bcc0ec2..4d4c6c84c 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -7952,7 +7952,13 @@ class dblink:
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,