summaryrefslogtreecommitdiffstats
path: root/urpme
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 /urpme
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 'urpme')
-rw-r--r--urpme8
1 files changed, 2 insertions, 6 deletions
diff --git a/urpme b/urpme
index 7ab603e1..05e94e31 100644
--- a/urpme
+++ b/urpme
@@ -122,15 +122,11 @@ if ($test && $auto) {
#- Warning : the following message is parsed in urpm::parallel_*
my $msg = N("Checking to remove the following packages");
print STDOUT "$msg:\n$list\n";
-} elsif (($parallel || @toremove > @l) && !$auto) {
- my $sum = 0;
- foreach (@toremove) {
- $sum += $state->{rejected}{$_}{size};
- }
+} elsif (($parallel || @toremove > @l) && !$auto || 1) {
my $msg =
P("To satisfy dependencies, the following package will be removed",
"To satisfy dependencies, the following %d packages will be removed",
- scalar(@toremove), scalar(@toremove)) . N(" (%d MB)", toMb($sum));
+ scalar(@toremove), scalar(@toremove)) . sprintf(" (%s)", formatXiB(-$urpm->selected_size($state)));
print STDOUT "$msg:\n$list\n";
message_input(P("Remove %d package?", "Remove %d packages?", scalar(@toremove), scalar(@toremove)) . N(" (y/N) "), $force && $yesexpr, boolean => 1) =~ /[$yesexpr]/ or exit 0;
}