self._ignored_deps.append(dep)
return 1
- if not self._add_pkg(dep_pkg, dep.parent,
- priority=dep.priority, depth=dep.depth):
+ if not self._add_pkg(dep_pkg, dep):
return 0
return 1
- def _add_pkg(self, pkg, myparent, priority=None, depth=0):
+ def _add_pkg(self, pkg, dep):
+ myparent = None
+ priority = None
+ depth = 0
+ if dep is None:
+ dep = Dependency()
+ else:
+ myparent = dep.parent
+ priority = dep.priority
+ depth = dep.depth
if priority is None:
priority = DepPriority()
"""
arg = args.pop()
for atom in arg.set:
self.spinner.update()
+ dep = Dependency(atom=atom, onlydeps=onlydeps,
+ root=myroot, parent=arg)
atom_cp = portage.dep_getkey(atom)
try:
pprovided = pprovideddict.get(portage.dep_getkey(atom))
self._pprovided_args.append((arg, atom))
continue
if isinstance(arg, PackageArg):
- if not self._add_pkg(arg.package, arg) or \
+ if not self._add_pkg(arg.package, dep) or \
not self._create_graph():
sys.stderr.write(("\n\n!!! Problem resolving " + \
"dependencies for %s\n") % arg.arg)
arg.name in ("system", "world")):
return 0, myfavorites
- dep = Dependency(atom=atom, onlydeps=onlydeps,
- root=myroot, parent=arg)
-
# Add the selected package to the graph as soon as possible
# so that later dep_check() calls can use it as feedback
# for making more consistent atom selections.
- if not self._add_pkg(pkg, dep.parent,
- priority=dep.priority, depth=dep.depth):
+ if not self._add_pkg(pkg, dep):
if isinstance(arg, SetArg):
sys.stderr.write(("\n\n!!! Problem resolving " + \
"dependencies for %s from %s\n") % \
# will be appropriately reported as a slot collision
# (possibly solvable via backtracking).
pkg = matches[-1] # highest match
- if not self._add_pkg(pkg, dep.parent,
- priority=dep.priority, depth=dep.depth):
+ if not self._add_pkg(pkg, dep):
return 0
if not self._create_graph(allow_unsatisfied=True):
return 0
arg.root_config.root, atom)
if existing_node is None and \
pkg is not None:
- if not self._add_pkg(pkg, arg):
+ if not self._add_pkg(pkg, Dependency(atom=atom,
+ root=pkg.root, parent=arg)):
return False
# Allow unsatisfied deps here to avoid showing a masking
for consumer_dblink in set(chain(*consumers.values())):
consumer_pkg = vardb.get(("installed", myroot,
consumer_dblink.mycpv, "nomerge"))
- resolver._add_pkg(pkg, consumer_pkg,
- priority=UnmergeDepPriority(runtime=True))
+ resolver._add_pkg(pkg, Dependency(parent=consumer_pkg,
+ priority=UnmergeDepPriority(runtime=True),
+ root=pkg.root))
writemsg_level("\nCalculating dependencies ")
success = resolver._complete_graph()