summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-05-31 21:26:49 +0000
committerZac Medico <zmedico@gentoo.org>2007-05-31 21:26:49 +0000
commit5befa4c03d617eacae8ee792012f5b18f696c82d (patch)
tree47ccff376cce5e33a9e47d4fa3ebf76bdb108990
parentd9a9f08fc3a80bba3332267e13ed9409530c50ec (diff)
downloadportage-5befa4c03d617eacae8ee792012f5b18f696c82d.tar.gz
portage-5befa4c03d617eacae8ee792012f5b18f696c82d.tar.bz2
portage-5befa4c03d617eacae8ee792012f5b18f696c82d.zip
Make dep_zapdeps() pull SLOT from the correct dbapi instance when it falls back to the vdb.
svn path=/main/trunk/; revision=6698
-rw-r--r--pym/portage/__init__.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 71bd9188c..5417a5c8c 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -4295,16 +4295,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)