From 6b141902dca0a989c8573b87b4d960de4f8db577 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 3 Jul 2006 17:35:45 +0000 Subject: [PATCH] When displaying the resume merge list, don't show the skipped package when --skipfirst is enabled. See bug #121106. svn path=/main/trunk/; revision=3778 --- bin/emerge | 16 ++++++++++++++-- pym/output.py | 1 + 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/bin/emerge b/bin/emerge index ff9c8391e..64a40c7fc 100755 --- a/bin/emerge +++ b/bin/emerge @@ -3328,7 +3328,13 @@ def action_build(settings, trees, mtimedb, if "--ask" in myopts: if "--resume" in myopts: validate_merge_list(trees, mtimedb["resume"]["mergelist"]) - mydepgraph.display(mtimedb["resume"]["mergelist"]) + mymergelist = mtimedb["resume"]["mergelist"] + if "--skipfirst" in myopts: + mymergelist = mymergelist[1:] + if len(mymergelist) == 0: + print colorize("INFORM", "emerge: It seems we have nothing to resume...") + sys.exit(0) + mydepgraph.display(mymergelist) prompt="Would you like to resume merging these packages?" else: mydepgraph.display(mydepgraph.altlist()) @@ -3366,7 +3372,13 @@ def action_build(settings, trees, mtimedb, if ("--pretend" in myopts) and not ("--fetchonly" in myopts or "--fetch-all-uri" in myopts): if ("--resume" in myopts): validate_merge_list(trees, mtimedb["resume"]["mergelist"]) - mydepgraph.display(mtimedb["resume"]["mergelist"]) + mymergelist = mtimedb["resume"]["mergelist"] + if "--skipfirst" in myopts: + mymergelist = mymergelist[1:] + if len(mymergelist) == 0: + print colorize("INFORM", "emerge: It seems we have nothing to resume...") + sys.exit(0) + mydepgraph.display(mymergelist) else: mydepgraph.display(mydepgraph.altlist()) else: diff --git a/pym/output.py b/pym/output.py index d41f7f20e..458cafa81 100644 --- a/pym/output.py +++ b/pym/output.py @@ -124,6 +124,7 @@ codes["HILITE"] = codes["teal"] codes["BRACKET"] = codes["blue"] # Portage functions +codes["INFORM"] = codes["darkgreen"] codes["UNMERGE_WARN"] = codes["red"] codes["MERGE_LIST_PROGRESS"] = codes["yellow"] -- 2.26.2