# 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
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,
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,