Remove obsolete others_in_slot plibs code.
authorZac Medico <zmedico@gentoo.org>
Sun, 8 May 2011 20:19:47 +0000 (13:19 -0700)
committerZac Medico <zmedico@gentoo.org>
Sun, 8 May 2011 20:48:51 +0000 (13:48 -0700)
This code dates back to commit 79a2ade5a6cb5a6c2d7ace838a39a634265c5522
and the preserve-libs logic was different back then. At that time, the
dblink._preserve_libs() method would earlier register preserved libs
for the new package currently being merged, while the vardb entry was
still a -MERGING- node. Current code does not register preserve_paths
until later, so this others_in_slot code is obsolete.

pym/portage/dbapi/vartree.py

index 156defc556952539e525a322cf226f7c911f99cb..7072ce0c56f51f2dd2c5ef540423117a337555cd 100644 (file)
@@ -1462,7 +1462,7 @@ class dblink(object):
                self.contentscache = pkgfiles
                return pkgfiles
 
-       def _prune_plib_registry(self, unmerge=False, others_in_slot=[],
+       def _prune_plib_registry(self, unmerge=False,
                needed=None, preserve_paths=None):
                # remove preserved libraries that don't have any consumers left
                plib_registry = self.vartree.dbapi._plib_registry
@@ -1485,15 +1485,6 @@ class dblink(object):
                                if cpv_lib_map:
                                        self._remove_preserved_libs(cpv_lib_map)
                                        for cpv, removed in cpv_lib_map.items():
-                                               if not self.vartree.dbapi.cpv_exists(cpv):
-                                                       for dblnk in others_in_slot:
-                                                               if dblnk.mycpv == cpv:
-                                                                       # This one just got merged so it doesn't
-                                                                       # register with cpv_exists() yet.
-                                                                       self.vartree.dbapi.removeFromContents(
-                                                                               dblnk, removed)
-                                                                       break
-                                                       continue
                                                self.vartree.dbapi.removeFromContents(cpv, removed)
 
                                if unmerge:
@@ -1645,8 +1636,7 @@ class dblink(object):
                                        showMessage(_("!!! FAILED postrm: %s\n") % retval,
                                                level=logging.ERROR, noiselevel=-1)
 
-                       self._prune_plib_registry(unmerge=True,
-                               others_in_slot=others_in_slot, needed=needed,
+                       self._prune_plib_registry(unmerge=True, needed=needed,
                                preserve_paths=preserve_paths)
                finally:
                        self.vartree.dbapi._bump_mtime(self.mycpv)