summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-05-03 23:09:17 +0000
committerZac Medico <zmedico@gentoo.org>2008-05-03 23:09:17 +0000
commit9adcc3284b28b4750e19a8d19b84deb0941b41eb (patch)
tree357bde0e26811f8fe8563105519be52dc36d811c /pym
parent7cc987fcf81e5be6c6868f30b3bba61cc1f916cc (diff)
downloadportage-9adcc3284b28b4750e19a8d19b84deb0941b41eb.tar.gz
portage-9adcc3284b28b4750e19a8d19b84deb0941b41eb.tar.bz2
portage-9adcc3284b28b4750e19a8d19b84deb0941b41eb.zip
When a resume list is rejected, display the invalid resume list data
in case the user is interested. This is enabled with --verbose or --debug. svn path=/main/trunk/; revision=10145
Diffstat (limited to 'pym')
-rw-r--r--pym/_emerge/__init__.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 2a4db0585..e7e8e0779 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -4763,7 +4763,9 @@ class depgraph(object):
favorites = resume_data.get("favorites")
if isinstance(favorites, list):
self._load_favorites(resume_data)
- mergelist = resume_data.get("mergelist", [])
+ mergelist = resume_data.get("mergelist")
+ if not isinstance(mergelist, list):
+ mergelist = []
if mergelist and "--skipfirst" in self.myopts:
for i, task in enumerate(mergelist):
@@ -7717,6 +7719,7 @@ def action_build(settings, trees, mtimedb,
del myopts["--tree"]
portage.writemsg(colorize("WARN", " * ") + \
"--tree is broken with --nodeps. Disabling...\n")
+ debug = "--debug" in myopts
verbose = "--verbose" in myopts
quiet = "--quiet" in myopts
if pretend or fetchonly:
@@ -7778,6 +7781,19 @@ def action_build(settings, trees, mtimedb,
from portage.output import EOutput
out = EOutput()
+ resume_data = mtimedb["resume"]
+ mergelist = resume_data.get("mergelist")
+ if not isinstance(mergelist, list):
+ mergelist = []
+ if mergelist and debug or (verbose and not quiet):
+ out.eerror("Invalid resume list:")
+ out.eerror("")
+ indent = " "
+ for task in mergelist:
+ if isinstance(task, list):
+ out.eerror(indent + str(tuple(task)))
+ out.eerror("")
+
if isinstance(e, mydepgraph.UnsatisfiedResumeDep):
out.eerror("One or more expected dependencies " + \
"are not installed:")