Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r9611 - in main/trunk/pym: _emerge portage
Date: Sun, 30 Mar 2008 02:13:24
Message-Id: E1Jfn2v-0003Za-8Y@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-03-30 02:13:19 +0000 (Sun, 30 Mar 2008)
3 New Revision: 9611
4
5 Modified:
6 main/trunk/pym/_emerge/__init__.py
7 main/trunk/pym/portage/__init__.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. (branches/2.1.2 r9610)
12
13
14 Modified: main/trunk/pym/_emerge/__init__.py
15 ===================================================================
16 --- main/trunk/pym/_emerge/__init__.py 2008-03-30 00:55:46 UTC (rev 9610)
17 +++ main/trunk/pym/_emerge/__init__.py 2008-03-30 02:13:19 UTC (rev 9611)
18 @@ -2484,12 +2484,14 @@
19 myuse=myuse, strict=strict)
20 if True:
21 try:
22 + self.trees[root]["selective"] = "selective" in self.myparams
23 if not strict:
24 portage.dep._dep_check_strict = False
25 mycheck = portage.dep_check(depstring, None,
26 pkgsettings, myuse=myuse,
27 myroot=root, trees=trees)
28 finally:
29 + self.trees[root]["selective"] = False
30 portage.dep._dep_check_strict = True
31 if not mycheck[0]:
32 raise portage.exception.InvalidDependString(mycheck[1])
33
34 Modified: main/trunk/pym/portage/__init__.py
35 ===================================================================
36 --- main/trunk/pym/portage/__init__.py 2008-03-30 00:55:46 UTC (rev 9610)
37 +++ main/trunk/pym/portage/__init__.py 2008-03-30 02:13:19 UTC (rev 9611)
38 @@ -5315,6 +5315,7 @@
39 if trees is None:
40 global db
41 trees = db
42 + selective = trees[myroot].get("selective", False)
43 writemsg("ZapDeps -- %s\n" % (use_binaries), 2)
44 if not reduced or unreduced == ["||"] or dep_eval(reduced):
45 return []
46 @@ -5378,7 +5379,7 @@
47 has_mask = False
48 if hasattr(mydbapi, "xmatch"):
49 has_mask = bool(mydbapi.xmatch("match-all", atom))
50 - if (use_binaries or not has_mask):
51 + if (selective or use_binaries or not has_mask):
52 avail_pkg = best(vardb.match(atom))
53 if avail_pkg:
54 avail_slot = "%s:%s" % (dep_getkey(atom),
55
56 --
57 gentoo-commits@l.g.o mailing list