From d61643ad4956196be5222ba45330f9538d8f0ab7 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 3 May 2008 23:11:54 +0000 Subject: [PATCH] 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. (trunk r10145) svn path=/main/branches/2.1.2/; revision=10146 --- bin/emerge | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/bin/emerge b/bin/emerge index 507792962..864ac0be7 100755 --- a/bin/emerge +++ b/bin/emerge @@ -4920,7 +4920,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): @@ -7730,6 +7732,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: @@ -7791,6 +7794,19 @@ def action_build(settings, trees, mtimedb, from 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("An expected dependency " + \ "is not installed: %s" % str(e)) -- 2.26.2