diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-12-02 07:58:50 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-12-02 07:58:50 +0000 |
commit | ff1009f5912a776cf6461e7d5b48d49e1b3595b5 (patch) | |
tree | cec4430764ec02efa403fde4e9a6639975504f7b /pym/portage.py | |
parent | ff77f4241da90b5073a206f5c7985f00cef30a77 (diff) | |
download | portage-ff1009f5912a776cf6461e7d5b48d49e1b3595b5.tar.gz portage-ff1009f5912a776cf6461e7d5b48d49e1b3595b5.tar.bz2 portage-ff1009f5912a776cf6461e7d5b48d49e1b3595b5.zip |
In dblink.treewalk(), tweak the "Safely unmerging
already-installed instance" logic to make sure that
it works in all possible cases. (trunk r8801)
svn path=/main/branches/2.1.2/; revision=8802
Diffstat (limited to 'pym/portage.py')
-rw-r--r-- | pym/portage.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/pym/portage.py b/pym/portage.py index ca5974675..f46276968 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -8856,6 +8856,16 @@ class dblink: outfile.flush() outfile.close() + # 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. + others_in_slot.append(self) # self has just been merged + for dblnk in others_in_slot: + dblnk.contentscache = None + dblnk._contents_inodes = None + # If portage is reinstalling itself, remove the old # version now since we want to use the temporary # PORTAGE_BIN_PATH that will be removed when we return. @@ -8865,19 +8875,13 @@ class dblink: "portage" == pkgsplit(self.pkg)[0]: reinstall_self = True - for dblnk in others_in_slot: + for dblnk in list(others_in_slot): + if dblnk is self: + continue if dblnk.mycpv != self.mycpv and \ not reinstall_self: 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, others_in_slot=others_in_slot) |