#1465.. cli'de de görelim..
This commit is contained in:
@@ -223,6 +223,16 @@ def install_pkg_names(A, reinstall = False):
|
|||||||
in the respective order to satisfy dependencies:
|
in the respective order to satisfy dependencies:
|
||||||
""") + util.strlist(order))
|
""") + util.strlist(order))
|
||||||
|
|
||||||
|
#this silly try/except block will be removed soon..
|
||||||
|
try:
|
||||||
|
total_size = sum([packagedb.get_package(p).packageSize for p in order])
|
||||||
|
except:
|
||||||
|
total_size = 0
|
||||||
|
|
||||||
|
if total_size:
|
||||||
|
total_size, symbol = util.human_readable_size(total_size)
|
||||||
|
ctx.ui.warning(_('Total size of packages: %.2f %s' % (total_size, symbol)))
|
||||||
|
|
||||||
if ctx.get_option('dry_run'):
|
if ctx.get_option('dry_run'):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ _ = __trans.ugettext
|
|||||||
import pisi
|
import pisi
|
||||||
import pisi.context as ctx
|
import pisi.context as ctx
|
||||||
import pisi.archive as archive
|
import pisi.archive as archive
|
||||||
|
from pisi.packagedb import get_package
|
||||||
from pisi.uri import URI
|
from pisi.uri import URI
|
||||||
from pisi.metadata import MetaData
|
from pisi.metadata import MetaData
|
||||||
from pisi.files import Files
|
from pisi.files import Files
|
||||||
@@ -48,6 +49,11 @@ 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())
|
||||||
|
|
||||||
|
package_size = 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):
|
||||||
|
|||||||
Reference in New Issue
Block a user