summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico2011-05-14 21:25:16 (GMT)
committerZac Medico2011-05-14 21:25:16 (GMT)
commitc331b8725f4ef53d7f65b624d085cd6dad5f29e9 (patch)
tree9b29b0ac1f56328c7d2a900c72a9d901dd5de6a0
parenta531c670849d81edd15ba3e3ae820cbfe063db68 (diff)
treewalk: fix plib_collisions with same cpv
-rw-r--r--pym/portage/dbapi/vartree.py22
1 files changed, 14 insertions, 8 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index cdae340..13d9ab2 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -3468,14 +3468,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.