From: Zac Medico Date: Sun, 30 Mar 2008 00:55:46 +0000 (-0000) Subject: For bugs #197810 and #215308, pass the depgraph's "selective" parameter X-Git-Tag: v2.1.5~293 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=13538539f7818ec6fc77e68fd20c41017caf946b;p=portage.git 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. svn path=/main/branches/2.1.2/; revision=9610 --- diff --git a/bin/emerge b/bin/emerge index b3a8d25f3..7c79c922a 100755 --- a/bin/emerge +++ b/bin/emerge @@ -2424,6 +2424,7 @@ class depgraph: mymerge = [] else: try: + self.trees[myroot]["selective"] = "selective" in self.myparams if myparent and p_status == "nomerge": portage_dep._dep_check_strict = False mycheck = portage.dep_check(depstring, None, @@ -2431,6 +2432,7 @@ class depgraph: use_binaries=("--usepkgonly" in self.myopts), myroot=myroot, trees=self.trees) finally: + self.trees[myroot]["selective"] = False portage_dep._dep_check_strict = True if not mycheck[0]: diff --git a/pym/portage.py b/pym/portage.py index 2cbc2ef07..7db532787 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -5290,6 +5290,7 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None): 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 [] @@ -5353,7 +5354,7 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None): 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),