summaryrefslogtreecommitdiffstats
path: root/urpmi
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-09-06 09:30:35 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-09-06 09:30:35 +0000
commit2040dc02c0235615eb575704931c8bc020781eae (patch)
tree81987f3bdea7032f102e9572cc077157944b42d8 /urpmi
parent7ba761dec0070ad2ae1aa7849a4d7d6cf1d9e2dc (diff)
downloadurpmi-2040dc02c0235615eb575704931c8bc020781eae.tar
urpmi-2040dc02c0235615eb575704931c8bc020781eae.tar.gz
urpmi-2040dc02c0235615eb575704931c8bc020781eae.tar.bz2
urpmi-2040dc02c0235615eb575704931c8bc020781eae.tar.xz
urpmi-2040dc02c0235615eb575704931c8bc020781eae.zip
- urpmi
o display size that will be installed - removed - urpmi, urpme o use best unit (KB, MB...) to display size will be installed - removed for this, use ->selected_size from perl-URPM and import formatXiB from drakx common.pm
Diffstat (limited to 'urpmi')
-rwxr-xr-xurpmi4
1 files changed, 1 insertions, 3 deletions
diff --git a/urpmi b/urpmi
index 8b6b6105..2d64d111 100755
--- a/urpmi
+++ b/urpmi
@@ -575,7 +575,6 @@ my @to_install;
#- check if there is at least one package to install that
#- has not been given by the user.
my $ask_user = $env || $search_result eq 'substring';
-my $sum = 0;
my @root_only;
foreach my $pkg (sort { $a->name cmp $b->name } @{$urpm->{depslist}}[keys %{$state->{selected}}]) {
@@ -587,7 +586,6 @@ foreach my $pkg (sort { $a->name cmp $b->name } @{$urpm->{depslist}}[keys %{$sta
if (!$env && $install_src && $pkg->arch ne 'src') {
push @root_only, $fullname;
} elsif ($install_src || $pkg->arch ne 'src') {
- $sum += $pkg->size;
if ($state->{selected}{$pkg->id}{suggested}) {
$fullname = N("%s (suggested)", $fullname);
}
@@ -607,7 +605,7 @@ if (@root_only && !$env) {
my $msg2 = P("Proceed with the installation of one package?",
"Proceed with the installation of the %d packages?",
$urpm->{nb_install}, $urpm->{nb_install})
- . N(" (%d MB)", toMb($sum));
+ . sprintf(" (%s)", formatXiB($urpm->selected_size($state)));
my $p = join "\n", @to_install;
if ($env && !$options{debug__do_not_install}) {
print "$msg\n$p\n$msg2\n";