diff options
author | 2010-05-20 19:00:15 -0700 | |
---|---|---|
committer | 2010-05-20 19:00:15 -0700 | |
commit | 5b55465077a5b65cf7fb4f9995c8389ce24526db (patch) | |
tree | 9ed802894e659a01c064c8aca9716a00190c4593 | |
parent | Use os.environ.get() instead of os.getenv(), to hopefully avoid issues (diff) | |
download | portage-idfetch-5b55465077a5b65cf7fb4f9995c8389ce24526db.tar.gz portage-idfetch-5b55465077a5b65cf7fb4f9995c8389ce24526db.tar.bz2 portage-idfetch-5b55465077a5b65cf7fb4f9995c8389ce24526db.zip |
If a dependency is installed but masked, try to pull in an unmasked version
even when --deep is not specified. Thanks to Daniel Robbins for reporting.
-rw-r--r-- | pym/_emerge/depgraph.py | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index d7f42c91..a9ef7299 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -834,6 +834,7 @@ class depgraph(object): # discarded dependencies reduce the amount of information # available for optimization of merge order. if dep.priority.satisfied and \ + dep.priority.satisfied.visible and \ not dep_pkg.installed and \ not (existing_node or recurse): myarg = None @@ -1286,8 +1287,17 @@ class depgraph(object): continue mypriority = dep_priority.copy() - if not atom.blocker and vardb.match(atom): - mypriority.satisfied = True + if not atom.blocker: + inst_pkgs = vardb.match_pkgs(atom) + if inst_pkgs: + for inst_pkg in inst_pkgs: + if inst_pkg.visible: + # highest visible + mypriority.satisfied = inst_pkg + break + if not mypriority.satisfied: + # none visible, so use highest + mypriority.satisfied = inst_pkgs[0] if not self._add_dep(Dependency(atom=atom, blocker=atom.blocker, child=child, depth=depth, parent=pkg, @@ -1323,8 +1333,17 @@ class depgraph(object): pkg, self._priority(runtime=True), root_config, atoms): # This is a GLEP 37 virtual, so its deps are all runtime. mypriority = self._priority(runtime=True) - if not atom.blocker and vardb.match(atom): - mypriority.satisfied = True + if not atom.blocker: + inst_pkgs = vardb.match_pkgs(atom) + if inst_pkgs: + for inst_pkg in inst_pkgs: + if inst_pkg.visible: + # highest visible + mypriority.satisfied = inst_pkg + break + if not mypriority.satisfied: + # none visible, so use highest + mypriority.satisfied = inst_pkgs[0] if not self._add_dep(Dependency(atom=atom, blocker=atom.blocker, child=child, depth=virt_pkg.depth, |