1 |
Author: zmedico |
2 |
Date: 2008-03-30 00:55:46 +0000 (Sun, 30 Mar 2008) |
3 |
New Revision: 9610 |
4 |
|
5 |
Modified: |
6 |
main/branches/2.1.2/bin/emerge |
7 |
main/branches/2.1.2/pym/portage.py |
8 |
Log: |
9 |
For bugs #197810 and #215308, pass the depgraph's "selective" parameter |
10 |
down into dep_check() for better atom preference selection when handling |
11 |
virtuals and other disjunctive || dependencies. |
12 |
|
13 |
|
14 |
Modified: main/branches/2.1.2/bin/emerge |
15 |
=================================================================== |
16 |
--- main/branches/2.1.2/bin/emerge 2008-03-30 00:31:01 UTC (rev 9609) |
17 |
+++ main/branches/2.1.2/bin/emerge 2008-03-30 00:55:46 UTC (rev 9610) |
18 |
@@ -2424,6 +2424,7 @@ |
19 |
mymerge = [] |
20 |
else: |
21 |
try: |
22 |
+ self.trees[myroot]["selective"] = "selective" in self.myparams |
23 |
if myparent and p_status == "nomerge": |
24 |
portage_dep._dep_check_strict = False |
25 |
mycheck = portage.dep_check(depstring, None, |
26 |
@@ -2431,6 +2432,7 @@ |
27 |
use_binaries=("--usepkgonly" in self.myopts), |
28 |
myroot=myroot, trees=self.trees) |
29 |
finally: |
30 |
+ self.trees[myroot]["selective"] = False |
31 |
portage_dep._dep_check_strict = True |
32 |
|
33 |
if not mycheck[0]: |
34 |
|
35 |
Modified: main/branches/2.1.2/pym/portage.py |
36 |
=================================================================== |
37 |
--- main/branches/2.1.2/pym/portage.py 2008-03-30 00:31:01 UTC (rev 9609) |
38 |
+++ main/branches/2.1.2/pym/portage.py 2008-03-30 00:55:46 UTC (rev 9610) |
39 |
@@ -5290,6 +5290,7 @@ |
40 |
if trees is None: |
41 |
global db |
42 |
trees = db |
43 |
+ selective = trees[myroot].get("selective", False) |
44 |
writemsg("ZapDeps -- %s\n" % (use_binaries), 2) |
45 |
if not reduced or unreduced == ["||"] or dep_eval(reduced): |
46 |
return [] |
47 |
@@ -5353,7 +5354,7 @@ |
48 |
has_mask = False |
49 |
if hasattr(mydbapi, "xmatch"): |
50 |
has_mask = bool(mydbapi.xmatch("match-all", atom)) |
51 |
- if (use_binaries or not has_mask): |
52 |
+ if (selective or use_binaries or not has_mask): |
53 |
avail_pkg = best(vardb.match(atom)) |
54 |
if avail_pkg: |
55 |
avail_slot = "%s:%s" % (dep_getkey(atom), |
56 |
|
57 |
-- |
58 |
gentoo-commits@l.g.o mailing list |