Add (x of y ) package counter in the "Installing" message, similar to the
authorZac Medico <zmedico@gentoo.org>
Thu, 30 Apr 2009 06:44:06 +0000 (06:44 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 30 Apr 2009 06:44:06 +0000 (06:44 -0000)
counter show in the "Emerging" message. Thanks to Ned Ludd <solar@g.o> for
the suggestion. (trunk r13239)

svn path=/main/branches/2.1.6/; revision=13420

pym/_emerge/__init__.py

index 0d3a3d378803a5e7bb40c7a29f0c2eaa1c710f5d..ebd64f105c8f1a7e361359531dcd42221b0c9443 100644 (file)
@@ -4020,7 +4020,11 @@ class PackageMerge(AsynchronousTask):
                        action_desc = "Installing"
                        preposition = "to"
 
-               msg = "%s %s" % (action_desc, colorize("GOOD", pkg.cpv))
+               msg = "%s (%s of %s) %s" % \
+                       (action_desc,
+                       colorize("MERGE_LIST_PROGRESS", str(pkg_count.curval)),
+                       colorize("MERGE_LIST_PROGRESS", str(pkg_count.maxval)),
+                       colorize("GOOD", pkg.cpv))
 
                if pkg.root != "/":
                        msg += " %s %s" % (preposition, pkg.root)