[yum-commits] Branch 'yum-3_2_X' - output.py
James Antill
james at osuosl.org
Tue Oct 28 04:02:26 UTC 2008
output.py | 27 +++++++++++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)
New commits:
commit 5e405ec2e6651dc828c9b47075b6867a7e145536
Author: James Antill <james at and.org>
Date: Mon Oct 27 23:59:37 2008 -0400
Iterate skipped_packages properly as they are pos not txmbrs, fixes BZ 468785
diff --git a/output.py b/output.py
index 502aa4b..3c2795c 100644
--- a/output.py
+++ b/output.py
@@ -789,8 +789,7 @@ class YumOutput:
(_('Removing'), self.tsInfo.removed),
(_('Installing for dependencies'), self.tsInfo.depinstalled),
(_('Updating for dependencies'), self.tsInfo.depupdated),
- (_('Removing for dependencies'), self.tsInfo.depremoved),
- (_('Skipped (dependency problems)'), self.skipped_packages),]:
+ (_('Removing for dependencies'), self.tsInfo.depremoved)]:
lines = []
for txmbr in pkglist:
(n,a,e,v,r) = txmbr.pkgtup
@@ -813,6 +812,30 @@ class YumOutput:
pkglist_lines.append((action, lines))
+ for (action, pkglist) in [(_('Skipped (dependency problems)'),
+ self.skipped_packages),]:
+ lines = []
+ for po in pkglist:
+ (n,a,e,v,r) = po.pkgtup
+ evr = po.printVer()
+ repoid = po.repoid
+ pkgsize = float(po.size)
+ size = self.format_number(pkgsize)
+
+ if a is None: # gpgkeys are weird
+ a = 'noarch'
+
+ lines.append((n, a, evr, repoid, size, []))
+ # Create a dict of field_length => number of packages, for
+ # each field.
+ for (d, v) in (("n",len(n)), ("v",len(evr)), ("r",len(repoid))):
+ data[d].setdefault(v, 0)
+ data[d][v] += 1
+ if a_wid < len(a): # max() is only in 2.5.z
+ a_wid = len(a)
+
+ pkglist_lines.append((action, lines))
+
if data['n']:
data = [data['n'], {}, data['v'], data['r'], {}]
columns = [1, a_wid, 1, 1, 5]
More information about the Yum-commits
mailing list