When displaying the resume merge list, don't show the skipped package when --skipfirs...
authorZac Medico <zmedico@gentoo.org>
Mon, 3 Jul 2006 17:35:45 +0000 (17:35 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 3 Jul 2006 17:35:45 +0000 (17:35 -0000)
svn path=/main/trunk/; revision=3778

bin/emerge
pym/output.py

index ff9c8391eff7c775d080d97adc070082752a6b49..64a40c7fcf3dfdbe79c7ba4e6aafbc61e75360a4 100755 (executable)
@@ -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:
index d41f7f20e740de5fe8b9d8a5d51d0bc86ce284cc..458cafa81c18417588aeb45f95b4e079b2ee2b76 100644 (file)
@@ -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"]