Thanks to Bo Ørsted Andresen <bo.andresen@zlin.dk> for this output fix for bug #153847.
authorZac Medico <zmedico@gentoo.org>
Tue, 7 Nov 2006 07:37:26 +0000 (07:37 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 7 Nov 2006 07:37:26 +0000 (07:37 -0000)
svn path=/main/trunk/; revision=4974

bin/emerge

index 58a39a5b61b49e5edaabb8a7bbf76f1005156c25..7b77d337ae140071697c01f2ddbd554239a6a07c 100755 (executable)
@@ -2238,9 +2238,10 @@ class PackageCounters(object):
                myoutput = []
                details = []
                myoutput.append("Total: %s package" % total_installs)
-               if total_installs > 1:
+               if total_installs != 1:
                        myoutput.append("s")
-               myoutput.append(" (")
+               if total_installs != 0:
+                       myoutput.append(" (")
                if self.upgrades > 0:
                        details.append("%s upgrade" % self.upgrades)
                        if self.upgrades > 1:
@@ -2264,7 +2265,9 @@ class PackageCounters(object):
                        if self.blocks > 1:
                                details[-1] += "s"
                myoutput.append(", ".join(details))
-               myoutput.append("), Size of downloads: %s" % format_size(self.totalsize))
+               if total_installs != 0:
+                       myoutput.append(")")
+               myoutput.append(", Size of downloads: %s" % format_size(self.totalsize))
                return "".join(myoutput)
 
 class MergeTask(object):