* pisi/cli/listupgrades.py (run): Return if there are no updates, resize the first column of the output.
* pisi/cli/listnewest.py (run): No need to double check for 'l' before the assignment of maxlen.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2009-02-04 Ozan Çağlayan <ozan@pardus.org.tr>
|
||||
* po/*.po: Update PO messages, fix bugzilla url,
|
||||
* po/tr.po: Complete missing translations.
|
||||
* pisi/cli/listupgrades.py (run): Return if there are no updates, resize the first column of the output.
|
||||
* pisi/cli/listnewest.py (run): No need to double check for 'l' before the assignment of maxlen.
|
||||
|
||||
2009-02-02 Faik Uygur <faik@pardus.org.tr>
|
||||
* Add human readable package size info to pisi info output. (#8845)
|
||||
* Speed up finding old packages process. (#9101)
|
||||
|
||||
@@ -79,8 +79,7 @@ packages from all repositories.
|
||||
ctx.ui.info(_("Packages added to %s:") % (repo))
|
||||
|
||||
# maxlen is defined dynamically from the longest package name (#9021)
|
||||
if l:
|
||||
maxlen = max([len(_p) for _p in l])
|
||||
maxlen = max([len(_p) for _p in l])
|
||||
|
||||
l.sort()
|
||||
for p in l:
|
||||
|
||||
@@ -67,8 +67,13 @@ Lists the packages that will be upgraded.
|
||||
|
||||
if not upgradable_pkgs:
|
||||
ctx.ui.info(_('No packages to upgrade.'))
|
||||
return
|
||||
|
||||
upgradable_pkgs.sort()
|
||||
|
||||
# Resize the first column according to the longest package name
|
||||
maxlen = max([len(_p) for _p in upgradable_pkgs])
|
||||
|
||||
if self.options.install_info:
|
||||
ctx.ui.info(_('Package Name |St| Version| Rel.| Build| Distro| Date'))
|
||||
print '========================================================================'
|
||||
@@ -81,4 +86,5 @@ Lists the packages that will be upgraded.
|
||||
elif self.options.install_info:
|
||||
ctx.ui.info('%-15s | %s ' % (package.name, inst_info.one_liner()))
|
||||
else:
|
||||
ctx.ui.info('%15s - %s ' % (package.name, package.summary))
|
||||
package.name = package.name + ' ' * (maxlen - len(package.name))
|
||||
ctx.ui.info('%s - %s' % (package.name, unicode(package.summary)))
|
||||
|
||||
Reference in New Issue
Block a user