[yum-commits] Branch 'yum-3_2_X' - 4 commits - output.py yum/__init__.py yum/packages.py
James Antill
james at osuosl.org
Sat Mar 6 06:06:27 UTC 2010
output.py | 20 ++++++++++++++++++++
yum/__init__.py | 3 ++-
yum/packages.py | 3 +++
3 files changed, 25 insertions(+), 1 deletion(-)
New commits:
commit a62fe968f5214f5049c5936f10081238a8a0082d
Author: James Antill <james at and.org>
Date: Thu Mar 4 19:12:36 2010 -0500
Make pkgs scriptable: ("%(ui_nevra)s - %(ui_from_repo)s" % pkg). BZ 570615
diff --git a/yum/packages.py b/yum/packages.py
index c473ece..33cbc39 100644
--- a/yum/packages.py
+++ b/yum/packages.py
@@ -290,6 +290,9 @@ class PackageObject(object):
return True
return False
+ def __getitem__(self, key):
+ return getattr(self, key)
+
def verEQ(self, other):
""" Compare package to another one, only rpm-version equality. """
if not other:
commit 7a3b51d02a8e2a11c16905fcc2a50d235540e48b
Author: James Antill <james at and.org>
Date: Thu Mar 4 16:35:47 2010 -0500
Don't issue warning on yum downgrade, for single uinstalled multilib packages
diff --git a/yum/__init__.py b/yum/__init__.py
index 69af7ba..7de65b1 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -3729,7 +3729,8 @@ class YumBase(depsolve.Depsolve):
break
if lipkg is None:
- if na not in warned_nas and not doing_group_pkgs:
+ if (na not in warned_nas and not doing_group_pkgs and
+ pkg.name not in latest_installed_n):
msg = _('No Match for available package: %s') % pkg
self.logger.critical(msg)
warned_nas.add(na)
commit db24f2bcf8abd331f060e4c0076723fe0e6704d4
Author: James Antill <james at and.org>
Date: Thu Mar 4 14:24:50 2010 -0500
First split any equal remaining space among overflowed columns
diff --git a/output.py b/output.py
index c32e71e..b09730a 100755
--- a/output.py
+++ b/output.py
@@ -410,6 +410,21 @@ class YumOutput:
total_width -= diff
continue
+ overflowed_columns = 0
+ for d in xrange(0, cols):
+ if not data[d]:
+ continue
+ overflowed_columns += 1
+ if overflowed_columns:
+ # Split the remaining spaces among each overflowed column
+ # equally
+ norm = total_width / overflowed_columns
+ for d in xrange(0, cols):
+ if not data[d]:
+ continue
+ columns[d] += norm
+ total_width -= norm
+
# Split the remaining spaces among each column equally, except the
# last one. And put the rest into the remainder column
cols -= 1
commit bee86788d81df6d57edf6c7d20ec59bbee53f82a
Author: James Antill <james at and.org>
Date: Thu Mar 4 14:21:20 2010 -0500
Prefer to overflow the last column, as then grep still works
diff --git a/output.py b/output.py
index 110aa0b..c32e71e 100755
--- a/output.py
+++ b/output.py
@@ -392,6 +392,11 @@ class YumOutput:
total_width)
if not thelps:
continue
+ # We prefer to overflow: the last column, and then earlier
+ # columns. This is so that in the best case (just overflow the
+ # last) ... grep still "works", and then we make it prettier.
+ if helps and (d == (cols - 1)) and (thelps / 2) < helps:
+ continue
if thelps < helps:
continue
helps = thelps
More information about the Yum-commits
mailing list