Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r13742 - main/trunk/pym/portage
Date: Tue, 30 Jun 2009 04:39:11
Message-Id: E1MLV7c-0002kN-BY@stork.gentoo.org
1 Author: zmedico
2 Date: 2009-06-30 04:39:07 +0000 (Tue, 30 Jun 2009)
3 New Revision: 13742
4
5 Modified:
6 main/trunk/pym/portage/__init__.py
7 Log:
8 Bug #82488 - In _expand_new_virtuals(), check PROVIDE before expanding
9 old-style virtuals.
10
11
12 Modified: main/trunk/pym/portage/__init__.py
13 ===================================================================
14 --- main/trunk/pym/portage/__init__.py 2009-06-30 04:13:47 UTC (rev 13741)
15 +++ main/trunk/pym/portage/__init__.py 2009-06-30 04:39:07 UTC (rev 13742)
16 @@ -6959,13 +6959,8 @@
17 # dependency that needs to be satisfied.
18 newsplit.append(x)
19 continue
20 - if not pkgs and len(mychoices) == 1:
21 - newsplit.append(portage.dep.Atom(x.replace(mykey, mychoices[0])))
22 - continue
23 - if isblocker:
24 - a = []
25 - else:
26 - a = ['||']
27 +
28 + a = []
29 for y in pkgs:
30 cpv, pv_split, db = y
31 depstring = " ".join(db.aux_get(cpv, dep_keys))
32 @@ -7011,13 +7006,30 @@
33 a.append(mycheck[1])
34 # Plain old-style virtuals. New-style virtuals are preferred.
35 if not pkgs:
36 - for y in mychoices:
37 - a.append(portage.dep.Atom(x.replace(mykey, y, 1)))
38 - if isblocker and not a:
39 - # Probably a compound virtual. Pass the atom through unprocessed.
40 + if repoman:
41 + # TODO: Add PROVIDE check for repoman.
42 + for y in mychoices:
43 + a.append(portage.dep.Atom(x.replace(mykey, y, 1)))
44 + else:
45 + for y in mychoices:
46 + new_atom = portage.dep.Atom(x.replace(mykey, y, 1))
47 + matches = portdb.match(new_atom)
48 + # portdb is an instance of depgraph._dep_check_composite_db, so
49 + # USE conditionals are already evaluated.
50 + if matches and mykey in \
51 + portdb.aux_get(matches[-1], ['PROVIDE'])[0].split():
52 + a.append(new_atom)
53 +
54 + if not a:
55 newsplit.append(x)
56 - continue
57 - newsplit.append(a)
58 + elif len(a) == 1:
59 + newsplit.append(a[0])
60 + else:
61 + if isblocker:
62 + newsplit.extend(a)
63 + else:
64 + newsplit.append(['||'] + a)
65 +
66 return newsplit
67
68 def dep_eval(deplist):