"""
self._sets["args"].update(resume_data.get("favorites", []))
mergelist = resume_data.get("mergelist", [])
+ favorites = resume_data.get("favorites")
+ if not isinstance(favorites, list):
+ favorites = []
if mergelist and "--skipfirst" in self.myopts:
for i, task in enumerate(mergelist):
operation=action, root=myroot,
type_name=pkg_type)
self._pkg_cache[pkg] = pkg
+
+ root_config = self.roots[pkg.root]
+ if "merge" == pkg.operation and \
+ not visible(root_config.settings, pkg):
+ self._unsatisfied_deps_for_display.append(
+ ((pkg.root, "="+pkg.cpv), {"myparent":None}))
+
fakedb[myroot].cpv_inject(pkg)
serialized_tasks.append(pkg)
self.spinner.update()
- self._serialized_tasks_cache = serialized_tasks
+
+ if self._unsatisfied_deps_for_display:
+ return False
+
+ if not serialized_tasks or "--nodeps" in self.myopts:
+ self._serialized_tasks_cache = serialized_tasks
+ else:
+ favorites_set = InternalPackageSet(atom for atom in favorites \
+ if isinstance(atom, basestring) and portage.isvalidatom(atom))
+ for node in serialized_tasks:
+ if isinstance(node, Package) and \
+ node.operation == "merge" and \
+ favorites_set.findAtomForPackage(node.cpv, node.metadata):
+ self._set_nodes.add(node)
+
+ self._select_package = self._select_pkg_from_graph
+ for task in serialized_tasks:
+ if isinstance(task, Package) and \
+ task.operation == "merge":
+ self._add_pkg(task, None)
+ if not self._create_graph():
+ return False
+ self._serialized_tasks_cache = None
+ try:
+ self.altlist()
+ except self._unknown_internal_error:
+ return False
+
+ for node in self.digraph.root_nodes():
+ if isinstance(node, Package) and \
+ node.operation == "merge":
+ # Give hint to the --tree display.
+ self._set_nodes.add(node)
+ return True
class _internal_exception(portage_exception.PortageException):
def __init__(self, value=""):
mymergelist = mylist
myfeat = self.settings.features[:]
- bad_resume_opts = set(["--ask", "--tree", "--changelog", "--skipfirst",
+ bad_resume_opts = set(["--ask", "--changelog", "--skipfirst",
"--resume"])
if "parallel-fetch" in myfeat and \
not ("--pretend" in self.myopts or \
fetch_env["FEATURES"] = fetch_env.get("FEATURES", "") + " -cvs"
fetch_env["PORTAGE_NICENESS"] = "0"
fetch_env["PORTAGE_PARALLEL_FETCHONLY"] = "1"
- fetch_args = [sys.argv[0], "--resume", "--fetchonly"]
+ fetch_args = [sys.argv[0], "--resume",
+ "--fetchonly", "--nodeps"]
resume_opts = self.myopts.copy()
# For automatic resume, we need to prevent
# any of bad_resume_opts from leaking in
mysettings.lock()
del myroot, mysettings
+ favorites = mtimedb["resume"].get("favorites")
+ if not isinstance(favorites, list):
+ favorites = []
+
# "myopts" is a list for backward compatibility.
resume_opts = mtimedb["resume"].get("myopts", [])
if isinstance(resume_opts, list):
myparams = create_depgraph_params(myopts, myaction)
mydepgraph = depgraph(settings, trees,
myopts, myparams, spinner)
+ success = False
try:
- mydepgraph.loadResumeCommand(mtimedb["resume"])
+ success = mydepgraph.loadResumeCommand(mtimedb["resume"])
except portage_exception.PackageNotFound:
if show_spinner:
print
out.eerror(" available to be emerged. Please restart/continue")
out.eerror(" the merge operation manually.")
+ if show_spinner:
+ print "\b\b... done!"
+
+ unsatisfied_block = False
+ if success:
+ mymergelist = mydepgraph.altlist()
+ if mymergelist and \
+ (isinstance(mymergelist[-1], Blocker) and \
+ not mymergelist[-1].satisfied):
+ if not fetchonly and not pretend:
+ unsatisfied_block = True
+ mydepgraph.display(
+ mydepgraph.altlist(reversed=tree),
+ favorites=favorites)
+ print "\n!!! Error: The above package list contains packages which cannot be installed"
+ print "!!! at the same time on the same system."
+ if not quiet:
+ show_blocker_docs_link()
+
+ if not success:
+ mydepgraph.display_problems()
+
+ if unsatisfied_block or not success:
# delete the current list and also the backup
# since it's probably stale too.
for k in ("resume", "resume_backup"):
mtimedb.pop(k, None)
mtimedb.commit()
+
return 1
- if show_spinner:
- print "\b\b... done!"
else:
if ("--resume" in myopts):
print darkgreen("emerge: It seems we have nothing to resume...")
print colorize("INFORM", "emerge: It seems we have nothing to resume...")
return os.EX_OK
favorites = mtimedb["resume"]["favorites"]
- retval = mydepgraph.display(mymergelist, favorites=favorites)
+ retval = mydepgraph.display(
+ mydepgraph.altlist(reversed=tree),
+ favorites=favorites)
if retval != os.EX_OK:
return retval
prompt="Would you like to resume merging these packages?"
print colorize("INFORM", "emerge: It seems we have nothing to resume...")
return os.EX_OK
favorites = mtimedb["resume"]["favorites"]
- retval = mydepgraph.display(mymergelist, favorites=favorites)
+ retval = mydepgraph.display(
+ mydepgraph.altlist(reversed=tree),
+ favorites=favorites)
if retval != os.EX_OK:
return retval
else:
import portage_debug
portage_debug.set_trace(True)
- if ("--resume" in myopts):
- if "--tree" in myopts:
- print "* --tree is currently broken with --resume. Disabling..."
- del myopts["--tree"]
-
if not ("--quiet" in myopts):
if not sys.stdout.isatty() or ("--nospinner" in myopts):
spinner.update = spinner.update_basic