Hi all:

This patch is pretty trivial; I'm sending it to the list, however,
because I'm not sure it's more correct than the existing code. This is a
form vs function thing, namely do we print out all the details of the
transaction, possibly causing the line to wrap, or do we truncate the
text to keep things pretty?

Current:

 firefox-devel           i386       1.5.0.9-3.fc6    updates           3.1 M
 frysk                   i686       0.0.1.2007.02.07.rh1-1.fc6  updates         
  6.9 M
 gd                      i386       2.0.33-10.fc6    updates           155 k

With Patch:

 firefox-devel            i386      1.5.0.9-3.fc6        updates       3.1 M
 frysk                    i686      0.0.1.2007.02.07.rh  updates       6.9 M
 gd                       i386      2.0.33-10.fc6        updates       155 k


So to make things pretty, you might end up losing part of a very long evr
string, or package name. I think you'd still get all the important information,
however.

So, what do people think?

-James

PS this is busy work I made for myself while Jeremy was doing awesome depsolver 
work
diff --git a/output.py b/output.py
index 6cc7d7e..d3f7b9a 100644
--- a/output.py
+++ b/output.py
@@ -242,7 +242,7 @@ class YumOutput:
         if len(self.tsInfo) > 0:
             out = """
 =============================================================================
- %-22s  %-9s  %-15s  %-16s  %-5s
+ %-22.22s  %-9.9s  %-15.15s  %-16.16s  %-5.5s
 =============================================================================
 """ % ('Package', 'Arch', 'Version', 'Repository', 'Size')
         else:
@@ -262,7 +262,7 @@ class YumOutput:
                 repoid = txmbr.repoid
                 pkgsize = float(txmbr.po.size)
                 size = self.format_number(pkgsize)
-                msg = " %-22s  %-9s  %-15s  %-16s  %5s\n" % (n, a,
+                msg = " %-22.22s  %-9.9s  %-15.15s  %-16.16s  %5.5s\n" % (n, a,
                               evr, repoid, size)
                 for obspo in txmbr.obsoletes:
                     appended = '     replacing  %s.%s %s\n\n' % (obspo.name,

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel

Reply via email to