summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-12-09 07:07:05 +0000
committerZac Medico <zmedico@gentoo.org>2006-12-09 07:07:05 +0000
commit588f5f6c479b58199849a81b839a34fd20288e93 (patch)
tree971c46cd0d3a5ca0bc5fb004b2c1bf1a1f46c1ca /pym
parent67e8f71dfd23cd7a8a9ca81bf38083ca84638d19 (diff)
downloadportage-588f5f6c479b58199849a81b839a34fd20288e93.tar.gz
portage-588f5f6c479b58199849a81b839a34fd20288e93.tar.bz2
portage-588f5f6c479b58199849a81b839a34fd20288e93.zip
Fix broken SLOT update logic in fakedbapi.cpv_inject().
svn path=/main/trunk/; revision=5236
Diffstat (limited to 'pym')
-rw-r--r--pym/portage.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 93a304b73..d07089a42 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -4405,9 +4405,13 @@ class fakedbapi(dbapi):
if myslot and mycp in self.cpdict:
# If necessary, remove another package in the same SLOT.
for cpv in self.cpdict[mycp]:
- if mycpv != cpv and myslot == self.cpvdict[cpv]:
- self.cpv_remove(cpv)
- break
+ if mycpv != cpv:
+ other_metadata = self.cpvdict[cpv]
+ if other_metadata:
+ other_slot = metadata.get("SLOT", None)
+ if myslot == other_slot:
+ self.cpv_remove(cpv)
+ break
if mycp not in self.cpdict:
self.cpdict[mycp] = []
if not mycpv in self.cpdict[mycp]: