summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-04-01 18:08:06 +0000
committerZac Medico <zmedico@gentoo.org>2008-04-01 18:08:06 +0000
commit672dad4ecc634ec20fbdcfdd86ae756283553050 (patch)
tree1de4133e6b6ab7525ad8819c85af33e6db911c2a /pym
parent081731040b8e9c443096c013da66f0e855358994 (diff)
downloadportage-672dad4ecc634ec20fbdcfdd86ae756283553050.tar.gz
portage-672dad4ecc634ec20fbdcfdd86ae756283553050.tar.bz2
portage-672dad4ecc634ec20fbdcfdd86ae756283553050.zip
Exploid ascending order returned from dbapi.match() calls to avoid the need
to call best(). svn path=/main/trunk/; revision=9665
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 7364127b3..a853e067f 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -5378,8 +5378,9 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None):
all_available = True
versions = {}
for atom in atoms:
- avail_pkg = best(mydbapi.match(atom))
+ avail_pkg = mydbapi.match(atom)
if avail_pkg:
+ avail_pkg = avail_pkg[-1] # highest (ascending order)
avail_slot = "%s:%s" % (dep_getkey(atom),
mydbapi.aux_get(avail_pkg, ["SLOT"])[0])
elif not avail_pkg:
@@ -5387,8 +5388,9 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None):
if hasattr(mydbapi, "xmatch"):
has_mask = bool(mydbapi.xmatch("match-all", atom))
if (selective or use_binaries or not has_mask):
- avail_pkg = best(vardb.match(atom))
+ avail_pkg = vardb.match(atom)
if avail_pkg:
+ avail_pkg = avail_pkg[-1] # highest (ascending order)
avail_slot = "%s:%s" % (dep_getkey(atom),
vardb.aux_get(avail_pkg, ["SLOT"])[0])
if not avail_pkg: