From 588f5f6c479b58199849a81b839a34fd20288e93 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 9 Dec 2006 07:07:05 +0000 Subject: [PATCH] Fix broken SLOT update logic in fakedbapi.cpv_inject(). svn path=/main/trunk/; revision=5236 --- pym/portage.py | 10 +++++++--- 1 file 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]: -- 2.26.2