From 2040dc02c0235615eb575704931c8bc020781eae Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 6 Sep 2007 09:30:35 +0000 Subject: - 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 --- urpme | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'urpme') 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; } -- cgit v1.2.1