diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-05-14 14:25:16 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-05-25 19:47:22 -0700 |
commit | 98c5747c9a7fd278b90fa663badae91068b3d4d2 (patch) | |
tree | 2c19bd182cb2a0dc974c44da102844ced8265b61 | |
parent | 06ff898b73227d4c3f0c3414a5e1085b2fc651a6 (diff) | |
download | portage-98c5747c9a7fd278b90fa663badae91068b3d4d2.tar.gz portage-98c5747c9a7fd278b90fa663badae91068b3d4d2.tar.bz2 portage-98c5747c9a7fd278b90fa663badae91068b3d4d2.zip |
treewalk: fix plib_collisions with same cpv
-rw-r--r-- | pym/portage/dbapi/vartree.py | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 01c8b0ef9..db081e127 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -3426,14 +3426,20 @@ class dblink(object): for cpv, paths in plib_collisions.items(): if cpv not in plib_dict: continue - if cpv == self.mycpv: - continue - has_vdb_entry = True - try: - slot, counter = self.vartree.dbapi.aux_get( - cpv, ["SLOT", "COUNTER"]) - except KeyError: - has_vdb_entry = False + has_vdb_entry = False + if cpv != self.mycpv: + # If we've replaced another instance with the + # same cpv then the vdb entry no longer belongs + # to it, so we'll have to get the slot and couter + # from plib_registry._data instead. + try: + slot, counter = self.vartree.dbapi.aux_get( + cpv, ["SLOT", "COUNTER"]) + has_vdb_entry = True + except KeyError: + pass + + if not has_vdb_entry: # It's possible for previously unmerged packages # to have preserved libs in the registry, so try # to retrieve the slot and counter from there. |