Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r9670 - main/branches/2.1.2/pym
Date: Tue, 01 Apr 2008 18:43:46
Message-Id: E1JglSR-00060P-Gu@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-04-01 18:43:42 +0000 (Tue, 01 Apr 2008)
3 New Revision: 9670
4
5 Modified:
6 main/branches/2.1.2/pym/portage.py
7 Log:
8 Exploid ascending order returned from dbapi.match() calls to avoid the need
9 to call best(). (trunk r9665)
10
11
12 Modified: main/branches/2.1.2/pym/portage.py
13 ===================================================================
14 --- main/branches/2.1.2/pym/portage.py 2008-04-01 18:36:03 UTC (rev 9669)
15 +++ main/branches/2.1.2/pym/portage.py 2008-04-01 18:43:42 UTC (rev 9670)
16 @@ -5353,8 +5353,9 @@
17 all_available = True
18 versions = {}
19 for atom in atoms:
20 - avail_pkg = best(mydbapi.match(atom))
21 + avail_pkg = mydbapi.match(atom)
22 if avail_pkg:
23 + avail_pkg = avail_pkg[-1] # highest (ascending order)
24 avail_slot = "%s:%s" % (dep_getkey(atom),
25 mydbapi.aux_get(avail_pkg, ["SLOT"])[0])
26 elif not avail_pkg:
27 @@ -5362,8 +5363,9 @@
28 if hasattr(mydbapi, "xmatch"):
29 has_mask = bool(mydbapi.xmatch("match-all", atom))
30 if (selective or use_binaries or not has_mask):
31 - avail_pkg = best(vardb.match(atom))
32 + avail_pkg = vardb.match(atom)
33 if avail_pkg:
34 + avail_pkg = avail_pkg[-1] # highest (ascending order)
35 avail_slot = "%s:%s" % (dep_getkey(atom),
36 vardb.aux_get(avail_pkg, ["SLOT"])[0])
37 if not avail_pkg:
38
39 --
40 gentoo-commits@l.g.o mailing list