From 38e7ece7732e1a496b0580f5d457fc20f6e0bec6 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 9 Oct 2009 06:54:03 +0000 Subject: [PATCH] Bug #267468 - Display the total number of binary packages in the merge list. Thanks to Sebastian Mingramm (few) for this patch. svn path=/main/trunk/; revision=14520 --- pym/_emerge/PackageCounters.py | 5 +++++ pym/_emerge/depgraph.py | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/pym/_emerge/PackageCounters.py b/pym/_emerge/PackageCounters.py index 9da79d389..e99972e6f 100644 --- a/pym/_emerge/PackageCounters.py +++ b/pym/_emerge/PackageCounters.py @@ -22,6 +22,7 @@ class PackageCounters(object): self.restrict_fetch = 0 self.restrict_fetch_satisfied = 0 self.interactive = 0 + self.binary = 0 def __str__(self): total_installs = self.upgrades + self.downgrades + self.newslot + self.new + self.reinst @@ -50,6 +51,10 @@ class PackageCounters(object): details.append("%s reinstall" % self.reinst) if self.reinst > 1: details[-1] += "s" + if self.binary > 0: + details.append("%s binary" % self.binary) + if self.binary > 1: + details[-1] = details[-1][:-1] + "ies" if self.uninst > 0: details.append("%s uninstall" % self.uninst) if self.uninst > 1: diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 2cc9e170a..c384b5866 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -4161,6 +4161,8 @@ class depgraph(object): if ordered: if pkg_merge: counters.reinst += 1 + if pkg_type == "binary": + counters.binary += 1 elif pkg_status == "uninstall": counters.uninst += 1 # filter out old-style virtual matches @@ -4183,17 +4185,23 @@ class depgraph(object): addl += turquoise("U")+blue("D") if ordered: counters.downgrades += 1 + if pkg_type == "binary": + counters.binary += 1 else: # Update in slot addl += turquoise("U") + " " if ordered: counters.upgrades += 1 + if pkg_type == "binary": + counters.binary += 1 else: # New slot, mark it new. addl = " " + green("NS") + fetch + " " myoldbest = vardb.match(portage.cpv_getkey(pkg_key)) if ordered: counters.newslot += 1 + if pkg_type == "binary": + counters.binary += 1 if "--changelog" in self._frozen_config.myopts: inst_matches = vardb.match(pkg.slot_atom) @@ -4210,6 +4218,8 @@ class depgraph(object): addl = " " + green("N") + " " + fetch + " " if ordered: counters.new += 1 + if pkg_type == "binary": + counters.binary += 1 verboseadd = "" repoadd = None -- 2.26.2