* fix: don't show individual package size as warning, show it in

progress
This commit is contained in:
Eray Özkural
2006-05-08 09:02:42 +00:00
parent 67d437b93d
commit 3a6946623f
2 changed files with 4 additions and 8 deletions
+4 -2
View File
@@ -127,8 +127,10 @@ class CLI(UI):
return False return False
def display_progress(self, **ka): def display_progress(self, **ka):
out = '\r%-30.30s %3d%% %12.2f %s [%s]' % \ totalsize = '%4.1f %s' % pisi.util.human_readable_size(ka['total_size'])
(ka['filename'], ka['percent'], ka['rate'], ka['symbol'], ka['eta']) out = '\r%-30.30s (%s)%3d%% %9.2f %s [%s]' % \
(ka['filename'], totalsize, ka['percent'],
ka['rate'], ka['symbol'], ka['eta'])
self.output(out) self.output(out)
if ka['percent'] == 100: if ka['percent'] == 100:
self.output(colorize(_(' [complete]\n'), 'gray')) self.output(colorize(_(' [complete]\n'), 'gray'))
-6
View File
@@ -48,12 +48,6 @@ class Package:
# get current package name without version info (like tasma) # get current package name without version info (like tasma)
current_pkg = util.pure_package_name(url.filename()) 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), # if package is installed (which means we are upgrading it),
# calculate needed info # calculate needed info
if ctx.installdb.is_installed(current_pkg): if ctx.installdb.is_installed(current_pkg):