summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-07-09 10:14:00 +0000
committerZac Medico <zmedico@gentoo.org>2007-07-09 10:14:00 +0000
commit89189fc36741b5e8f7a5fb7c91f7022959dd3cfb (patch)
treee3b92e2653216b69072909f40c12a988e2d83018 /bin
parent5b6df227c9a0c4716868dd0b0258f53f3e23a562 (diff)
downloadportage-89189fc36741b5e8f7a5fb7c91f7022959dd3cfb.tar.gz
portage-89189fc36741b5e8f7a5fb7c91f7022959dd3cfb.tar.bz2
portage-89189fc36741b5e8f7a5fb7c91f7022959dd3cfb.zip
Fix interaction of resume opts with spinner output handling so that output always looks correct. (trunk r7207)
svn path=/main/branches/2.1.2/; revision=7208
Diffstat (limited to 'bin')
-rwxr-xr-xbin/emerge23
1 files changed, 14 insertions, 9 deletions
diff --git a/bin/emerge b/bin/emerge
index fd600aa86..b0310c2ad 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -3232,11 +3232,6 @@ class depgraph:
Add a resume command to the graph and validate it in the process. This
will raise a PackageNotFound exception if a package is not available.
"""
- # "myopts" is a list for backward compatibility.
- resume_opts = dict((k,True) for k in resume_data["myopts"])
- for opt in ("--skipfirst", "--ask", "--tree"):
- resume_opts.pop(opt, None)
- self.myopts.update(resume_opts)
self._sets["args"].update(resume_data.get("favorites", []))
mergelist = resume_data.get("mergelist", [])
fakedb = self.mydbapi
@@ -5303,15 +5298,25 @@ def action_build(settings, trees, mtimedb,
mysettings.lock()
del myroot, mysettings
- myparams = create_depgraph_params(myopts, myaction)
- if "--quiet" not in myopts and "--nodeps" not in myopts:
+ # "myopts" is a list for backward compatibility.
+ resume_opts = mtimedb["resume"].get("myopts", [])
+ if isinstance(resume_opts, list):
+ resume_opts = dict((k,True) for k in resume_opts)
+ for opt in ("--skipfirst", "--ask", "--tree"):
+ resume_opts.pop(opt, None)
+ myopts.update(resume_opts)
+ show_spinner = "--quiet" not in myopts and "--nodeps" not in myopts
+ if not show_spinner:
+ spinner.update = spinner.update_quiet
+ if show_spinner:
print "Calculating dependencies ",
+ myparams = create_depgraph_params(myopts, myaction)
mydepgraph = depgraph(settings, trees,
myopts, myparams, spinner)
try:
mydepgraph.loadResumeCommand(mtimedb["resume"])
except portage_exception.PackageNotFound:
- if "--quiet" not in myopts:
+ if show_spinner:
print
from output import EOutput
out = EOutput()
@@ -5319,7 +5324,7 @@ def action_build(settings, trees, mtimedb,
out.eerror(" available to be emerged. Please restart/continue")
out.eerror(" the merge operation manually.")
return 1
- if "--quiet" not in myopts and "--nodeps" not in myopts:
+ if show_spinner:
print "\b\b... done!"
else:
if ("--resume" in myopts):