summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-01-18 14:43:57 +0000
committerThierry Vignaud <tv@mandriva.org>2007-01-18 14:43:57 +0000
commit52e2b07d89c7439ca097d5072e95e28fa14819c4 (patch)
treec94a528c63a8d6877e9777977206563c30a3b2dd
parent0ad5d085926c86006942c4ad03355bd92753377e (diff)
downloadurpmi-52e2b07d89c7439ca097d5072e95e28fa14819c4.tar
urpmi-52e2b07d89c7439ca097d5072e95e28fa14819c4.tar.gz
urpmi-52e2b07d89c7439ca097d5072e95e28fa14819c4.tar.bz2
urpmi-52e2b07d89c7439ca097d5072e95e28fa14819c4.tar.xz
urpmi-52e2b07d89c7439ca097d5072e95e28fa14819c4.zip
(do_install_2) display the same info as the text version (number and size of packages)
-rwxr-xr-xgurpmi29
1 files changed, 7 insertions, 2 deletions
diff --git a/gurpmi2 b/gurpmi2
index 2ba2bab7..4bb0d4da 100755
--- a/gurpmi2
+++ b/gurpmi2
@@ -202,15 +202,20 @@ sub do_install {
sub do_install_2 () {
my @to_install;
+ my $sum;
foreach my $pkg (sort { $a->name cmp $b->name } @{$urpm->{depslist}}[keys %{$state->{selected}}]) {
- $pkg->arch ne 'src' and push @to_install, scalar $pkg->fullname;
+ if ($pkg->arch ne 'src') {
+ push @to_install, scalar $pkg->fullname;
+ $sum += $pkg->size;
+ }
}
$urpm->{nb_install} = @to_install;
@to_install > 1 && !$gurpmi::options{auto}
? ask_continue(P("To satisfy dependencies, the following package is going to be installed:",
"To satisfy dependencies, the following packages are going to be installed:",
scalar(@to_install),
- ) . join("\n", '', @to_install, ''), \&do_install_3)
+ ) . join("\n", '', @to_install, '') . N("(%d packages, %d MB)", scalar(@to_install), toMb($sum)),
+ , \&do_install_3)
: goto \&do_install_3;
}