root_config = self._frozen_config.roots[dep_root]
vardb = root_config.trees["vartree"].dbapi
+ traversed_virt_pkgs = set()
for atom, child in self._minimize_children(
pkg, dep_priority, root_config, selected_atoms[pkg]):
# available for optimization of merge order.
ignored = False
if not atom.blocker and \
- not is_virt and \
not recurse_satisfied and \
mypriority.satisfied and \
mypriority.satisfied.visible and \
dep.child = None
self._dynamic_config._ignored_deps.append(dep)
- if not ignored and not self._add_dep(dep,
- allow_unsatisfied=allow_unsatisfied):
- return 0
+ if not ignored:
+ if not self._add_dep(dep,
+ allow_unsatisfied=allow_unsatisfied):
+ return 0
+ if is_virt:
+ traversed_virt_pkgs.add(dep.child)
selected_atoms.pop(pkg)
for virt_dep, atoms in selected_atoms.items():
virt_pkg = virt_dep.child
+ if virt_pkg not in traversed_virt_pkgs:
+ continue
if debug:
writemsg_level("Candidates: %s: %s\n" % \
# from dep_check, map it back to the original, in
# order to avoid distortion in places like display
# or conflict resolution code.
+ is_virt = hasattr(atom, '_orig_atom')
atom = getattr(atom, '_orig_atom', atom)
# This is a GLEP 37 virtual, so its deps are all runtime.
# Dependencies of virtuals are considered to have the
# same depth as the virtual itself.
- if not self._add_dep(Dependency(atom=atom,
+ dep = Dependency(atom=atom,
blocker=atom.blocker, child=child, depth=virt_dep.depth,
- parent=virt_pkg, priority=mypriority, root=dep_root),
- allow_unsatisfied=allow_unsatisfied):
- return 0
+ parent=virt_pkg, priority=mypriority, root=dep_root)
+
+ ignored = False
+ if not atom.blocker and \
+ not recurse_satisfied and \
+ mypriority.satisfied and \
+ mypriority.satisfied.visible and \
+ dep.child is not None and \
+ not dep.child.installed:
+ myarg = None
+ if dep.root == self._frozen_config.target_root:
+ try:
+ myarg = next(
+ self._iter_atoms_for_pkg(dep.child))
+ except StopIteration:
+ pass
+ except InvalidDependString:
+ if not dep.child.installed:
+ raise
+
+ if myarg is None:
+ ignored = True
+ dep.child = None
+ self._dynamic_config._ignored_deps.append(dep)
+
+ if not ignored:
+ if not self._add_dep(dep,
+ allow_unsatisfied=allow_unsatisfied):
+ return 0
+ if is_virt:
+ traversed_virt_pkgs.add(dep.child)
if debug:
writemsg_level("Exiting... %s\n" % (pkg,),
["virtual/jre"],
options = {"--update" : True},
success = True,
+ mergelist = ['virtual/jre-1.6.0-r1', 'virtual/jre-1.5.0-r1']),
+
+ # Recursively traversed virtual dependencies, and their
+ # direct dependencies, are considered to have the same
+ # depth as direct dependencies.
+ ResolverPlaygroundTestCase(
+ ["virtual/jre"],
+ options = {"--update" : True, "--deep" : 1},
+ success = True,
mergelist = ['dev-java/icedtea-6.1-r1', 'dev-java/gcj-jdk-4.5-r1', 'virtual/jdk-1.6.0-r1', 'virtual/jdk-1.5.0-r1', 'virtual/jre-1.6.0-r1', 'virtual/jre-1.5.0-r1']),
ResolverPlaygroundTestCase(
["virtual/jre:1.5"],
options = {"--update" : True},
success = True,
- mergelist = ['dev-java/gcj-jdk-4.5-r1', 'virtual/jdk-1.5.0-r1', 'virtual/jre-1.5.0-r1']),
+ mergelist = ['virtual/jre-1.5.0-r1']),
ResolverPlaygroundTestCase(
["virtual/jre:1.6"],
options = {"--update" : True},
success = True,
- mergelist = ['dev-java/icedtea-6.1-r1', 'virtual/jdk-1.6.0-r1', 'virtual/jre-1.6.0-r1']),
+ mergelist = ['virtual/jre-1.6.0-r1']),
# Test that we don't pull in any unnecessary updates
# when --update is not specified, even though we
success = True,
mergelist = ["dev-java/ant-core-1.8"]),
- # FIXME: pulls in unwanted updates without --deep: ['dev-java/icedtea-6.1-r1', 'virtual/jdk-1.6.0-r1', 'dev-java/ant-core-1.8']
- #ResolverPlaygroundTestCase(
- # ["dev-java/ant-core"],
- # options = {"--update" : True},
- # success = True,
- # mergelist = ["dev-java/ant-core-1.8"]),
+ ResolverPlaygroundTestCase(
+ ["dev-java/ant-core"],
+ options = {"--update" : True},
+ success = True,
+ mergelist = ["dev-java/ant-core-1.8"]),
+
+ # Recursively traversed virtual dependencies, and their
+ # direct dependencies, are considered to have the same
+ # depth as direct dependencies.
+ ResolverPlaygroundTestCase(
+ ["dev-java/ant-core"],
+ options = {"--update" : True, "--deep" : 1},
+ success = True,
+ mergelist = ['dev-java/icedtea-6.1-r1', 'virtual/jdk-1.6.0-r1', 'dev-java/ant-core-1.8']),
ResolverPlaygroundTestCase(
["dev-db/hsqldb"],