summaryrefslogtreecommitdiff
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-08-12 11:43:27 +0000
committerZac Medico <zmedico@gentoo.org>2007-08-12 11:43:27 +0000
commitf077fa39a0f1f88e54da190382831b7a99cdb78d (patch)
treebf799fc78cbf6d534bd0250595dabfbcb259aa78 /pym
parentOptimize config.setcpv() so that it doesn't call regenerate() unnecessarily w... (diff)
downloadportage-idfetch-f077fa39a0f1f88e54da190382831b7a99cdb78d.tar.gz
portage-idfetch-f077fa39a0f1f88e54da190382831b7a99cdb78d.tar.bz2
portage-idfetch-f077fa39a0f1f88e54da190382831b7a99cdb78d.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.
svn path=/main/trunk/; revision=7591
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/dbapi/vartree.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 92f48337..d112c84e 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -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,