aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-09-20 10:20:46 +0000
committerThierry Vignaud <tv@mandriva.org>2007-09-20 10:20:46 +0000
commitdba21461011900863e89e81670c6819357060619 (patch)
treeb49892d48a7a2a3cafc7d940fb25ad43bb641360
parent7d415584ea15e22e131ee6193af02cc4e3e62eb6 (diff)
downloadrpmdrake-dba21461011900863e89e81670c6819357060619.tar
rpmdrake-dba21461011900863e89e81670c6819357060619.tar.gz
rpmdrake-dba21461011900863e89e81670c6819357060619.tar.bz2
rpmdrake-dba21461011900863e89e81670c6819357060619.tar.xz
rpmdrake-dba21461011900863e89e81670c6819357060619.zip
(perform_installation) display added/removed size
-rw-r--r--Rpmdrake/pkg.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index 63c8e894..19785bd0 100644
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -534,6 +534,7 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-(
my $r = formatlistpkg(map { scalar(urpm::select::translate_why_removed_one($urpm, $urpm->{state}, $_)) } @to_remove);
+ my $size = $urpm->selected_size($state);
my $install_count = int(@pkgs);
my $to_install = $install_count == 0 ? '' :
(P("The following package is going to be installed:", "The following %d packages are going to be installed:", $install_count, $install_count)
@@ -547,6 +548,10 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-(
N("The following package has to be removed for others to be upgraded:")
: N("The following packages have to be removed for others to be upgraded:")), $r), if_($to_install, $to_install))
: $to_install),
+ ($size >= 0 ?
+ N("%s of additional disk space will be used.", formatXiB($size)) :
+ N("%s of disk space will be freed.", formatXiB(-$size))
+ ),
N("Is it ok to continue?")),
scroll => 1,
yesno => 1) or return 1;