summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-05-31 21:30:08 +0000
committerZac Medico <zmedico@gentoo.org>2007-05-31 21:30:08 +0000
commit369ee750dc5a991160d5d01ddda964bcb47c8ecb (patch)
tree909fee57c8d42f7bad94058b39c977ece2109273
parentFix an IndexError in get_operator() that occurs when isvalidatom() passes it ... (diff)
downloadportage-multirepo-369ee750dc5a991160d5d01ddda964bcb47c8ecb.tar.gz
portage-multirepo-369ee750dc5a991160d5d01ddda964bcb47c8ecb.tar.bz2
portage-multirepo-369ee750dc5a991160d5d01ddda964bcb47c8ecb.zip
Make dep_zapdeps() pull SLOT from the correct dbapi instance when it falls back to the vdb. (trunk r6698)
svn path=/main/branches/2.1.2/; revision=6700
-rw-r--r--pym/portage.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 199dac8f..16f10539 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -4215,16 +4215,21 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None):
versions = {}
for atom in atoms:
avail_pkg = best(mydbapi.match(atom))
- if not avail_pkg and use_binaries:
+ if avail_pkg:
+ avail_slot = "%s:%s" % (dep_getkey(atom),
+ mydbapi.aux_get(avail_pkg, ["SLOT"])[0])
+ elif not avail_pkg and use_binaries:
# With --usepkgonly, count installed packages as "available".
# Note that --usepkgonly currently has no package.mask support.
# See bug #149816.
avail_pkg = best(vardb.match(atom))
+ if avail_pkg:
+ avail_slot = "%s:%s" % (dep_getkey(atom),
+ vardb.aux_get(avail_pkg, ["SLOT"])[0])
if not avail_pkg:
all_available = False
break
- avail_slot = "%s:%s" % (dep_getkey(atom),
- mydbapi.aux_get(avail_pkg, ["SLOT"])[0])
+
versions[avail_slot] = avail_pkg
this_choice = (atoms, versions, all_available)