[yum-commits] Branch 'yum-3_2_X' - output.py

Ville Skyttä scop at osuosl.org
Fri Jan 8 21:58:28 UTC 2010


 output.py |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit a5fb78accaf0ce3f907e732e4849932dd61d04b3
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Fri Jan 8 23:09:30 2010 +0200

    Sort obsoleted packages in transaction listings, remove extra newline between.
    
    Before:
    
    | foo                           x86_64   [...]
    | obsing                        x86_64   [...]
    |     replacing  obs2.x86_64 1.0-1.fc11
    |
    |     replacing  obs1.x86_64 1.0-1.fc11
    |
    | quux                          x86_64   [...]
    
    After:
    
    | foo                           x86_64   [...]
    | obsing                        x86_64   [...]
    |     replacing  obs1.x86_64 1.0-1.fc11
    |     replacing  obs2.x86_64 1.0-1.fc11
    | quux                          x86_64   [...]

diff --git a/output.py b/output.py
index e1062d7..1b6fafe 100755
--- a/output.py
+++ b/output.py
@@ -993,8 +993,8 @@ class YumOutput:
                            (evr, -v_wid), (repoid, -r_wid), (size, s_wid))
                 msg = self.fmtColumns(columns, u" ", u"\n")
                 hibeg, hiend = self._highlight(self.conf.color_update_installed)
-                for obspo in obsoletes:
-                    appended = _('     replacing  %s%s%s.%s %s\n\n')
+                for obspo in sorted(obsoletes):
+                    appended = _('     replacing  %s%s%s.%s %s\n')
                     appended %= (hibeg, obspo.name, hiend,
                                  obspo.arch, obspo.printVer())
                     msg = msg+appended


More information about the Yum-commits mailing list