* [gentoo-commits] portage r9611 - in main/trunk/pym: _emerge portage
@ 2008-03-30 2:13 Zac Medico (zmedico)
0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2008-03-30 2:13 UTC (permalink / raw
To: gentoo-commits
Author: zmedico
Date: 2008-03-30 02:13:19 +0000 (Sun, 30 Mar 2008)
New Revision: 9611
Modified:
main/trunk/pym/_emerge/__init__.py
main/trunk/pym/portage/__init__.py
Log:
For bugs #197810 and #215308, pass the depgraph's "selective" parameter
down into dep_check() for better atom preference selection when handling
virtuals and other disjunctive || dependencies. (branches/2.1.2 r9610)
Modified: main/trunk/pym/_emerge/__init__.py
===================================================================
--- main/trunk/pym/_emerge/__init__.py 2008-03-30 00:55:46 UTC (rev 9610)
+++ main/trunk/pym/_emerge/__init__.py 2008-03-30 02:13:19 UTC (rev 9611)
@@ -2484,12 +2484,14 @@
myuse=myuse, strict=strict)
if True:
try:
+ self.trees[root]["selective"] = "selective" in self.myparams
if not strict:
portage.dep._dep_check_strict = False
mycheck = portage.dep_check(depstring, None,
pkgsettings, myuse=myuse,
myroot=root, trees=trees)
finally:
+ self.trees[root]["selective"] = False
portage.dep._dep_check_strict = True
if not mycheck[0]:
raise portage.exception.InvalidDependString(mycheck[1])
Modified: main/trunk/pym/portage/__init__.py
===================================================================
--- main/trunk/pym/portage/__init__.py 2008-03-30 00:55:46 UTC (rev 9610)
+++ main/trunk/pym/portage/__init__.py 2008-03-30 02:13:19 UTC (rev 9611)
@@ -5315,6 +5315,7 @@
if trees is None:
global db
trees = db
+ selective = trees[myroot].get("selective", False)
writemsg("ZapDeps -- %s\n" % (use_binaries), 2)
if not reduced or unreduced == ["||"] or dep_eval(reduced):
return []
@@ -5378,7 +5379,7 @@
has_mask = False
if hasattr(mydbapi, "xmatch"):
has_mask = bool(mydbapi.xmatch("match-all", atom))
- if (use_binaries or not has_mask):
+ if (selective or use_binaries or not has_mask):
avail_pkg = best(vardb.match(atom))
if avail_pkg:
avail_slot = "%s:%s" % (dep_getkey(atom),
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-03-30 2:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-30 2:13 [gentoo-commits] portage r9611 - in main/trunk/pym: _emerge portage Zac Medico (zmedico)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox