summaryrefslogtreecommitdiffstats
path: root/pym/portage.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-04-01 18:43:42 +0000
committerZac Medico <zmedico@gentoo.org>2008-04-01 18:43:42 +0000
commit1c5a91926314189b91aab33968628bedb6180791 (patch)
tree47ee9132722c751cc2f4ca4b9da29ac24e66c1fd /pym/portage.py
parent103e093fa463481f2b511060fb0f9df861c5282a (diff)
downloadportage-1c5a91926314189b91aab33968628bedb6180791.tar.gz
portage-1c5a91926314189b91aab33968628bedb6180791.tar.bz2
portage-1c5a91926314189b91aab33968628bedb6180791.zip
Exploid ascending order returned from dbapi.match() calls to avoid the need
to call best(). (trunk r9665) svn path=/main/branches/2.1.2/; revision=9670
Diffstat (limited to 'pym/portage.py')
-rw-r--r--pym/portage.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 7b7ffb349..4158c99a2 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -5353,8 +5353,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:
@@ -5362,8 +5363,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: