* fix: don't show individual package size as warning, show it in
progress
This commit is contained in:
@@ -127,8 +127,10 @@ class CLI(UI):
|
||||
return False
|
||||
|
||||
def display_progress(self, **ka):
|
||||
out = '\r%-30.30s %3d%% %12.2f %s [%s]' % \
|
||||
(ka['filename'], ka['percent'], ka['rate'], ka['symbol'], ka['eta'])
|
||||
totalsize = '%4.1f %s' % pisi.util.human_readable_size(ka['total_size'])
|
||||
out = '\r%-30.30s (%s)%3d%% %9.2f %s [%s]' % \
|
||||
(ka['filename'], totalsize, ka['percent'],
|
||||
ka['rate'], ka['symbol'], ka['eta'])
|
||||
self.output(out)
|
||||
if ka['percent'] == 100:
|
||||
self.output(colorize(_(' [complete]\n'), 'gray'))
|
||||
|
||||
@@ -48,12 +48,6 @@ class Package:
|
||||
# get current package name without version info (like tasma)
|
||||
current_pkg = util.pure_package_name(url.filename())
|
||||
|
||||
if ctx.packagedb.has_package(current_pkg):
|
||||
package_size = ctx.packagedb.get_package(current_pkg).packageSize
|
||||
if package_size:
|
||||
package_size, symbol = util.human_readable_size(package_size)
|
||||
ctx.ui.warning(_("Package size: %.2f %s") % (package_size, symbol))
|
||||
|
||||
# if package is installed (which means we are upgrading it),
|
||||
# calculate needed info
|
||||
if ctx.installdb.is_installed(current_pkg):
|
||||
|
||||
Reference in New Issue
Block a user