summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-03-04 14:46:50 +0000
committerFrancois Pons <fpons@mandriva.com>2002-03-04 14:46:50 +0000
commit274fe6a8db532fab2feabe4ce62ef7cf58bd1c76 (patch)
treedd0e71a9295df9fe9f3cfd9270aeae11a4911e58
parent29d88ee4005a70014a1f0d571e9a8dc72ac6db3e (diff)
downloaddrakx-274fe6a8db532fab2feabe4ce62ef7cf58bd1c76.tar
drakx-274fe6a8db532fab2feabe4ce62ef7cf58bd1c76.tar.gz
drakx-274fe6a8db532fab2feabe4ce62ef7cf58bd1c76.tar.bz2
drakx-274fe6a8db532fab2feabe4ce62ef7cf58bd1c76.tar.xz
drakx-274fe6a8db532fab2feabe4ce62ef7cf58bd1c76.zip
fixed interpretation of size of package when doing an install (this can be
severe, need testing).
-rw-r--r--perl-install/pkgs.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 1398ad94f..3b8033e26 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -80,7 +80,7 @@ sub packageFile { $_[0] && $_[0]->[$FILE] =~ /^([^:\s]*-[^:\-\s]+-[^:\-\
: die "invalid file `" . ($_[0] && $_[0]->[$FILE]) . "'\n" . backtrace() }
sub packageEpoch { $_[0] && $_[0]->[$EPOCH] || 0 }
-sub packageSize { to_int($_[0] && $_[0]->[$SIZE_DEPS]) }
+sub packageSize { to_int($_[0] && ($_[0]->[$SIZE_DEPS] - ($_[0]->[$INSTALLED_CUMUL_SIZE] || 0))) }
sub packageDepsId { split ' ', ($_[0] && ($_[0]->[$SIZE_DEPS] =~ /^\d*\s*(.*)/)[0]) }
sub packageFlagSelected { $_[0] && $_[0]->[$FLAGS] & $PKGS_SELECTED }
@@ -168,7 +168,7 @@ sub selectedSize {
my ($packages) = @_;
my $size = 0;
foreach (values %{$packages->{names}}) {
- packageFlagSelected($_) && !packageFlagInstalled($_) and $size += packageSize($_) - ($_->[$INSTALLED_CUMUL_SIZE] || 0);
+ packageFlagSelected($_) && !packageFlagInstalled($_) and $size += packageSize($_);
}
$size;
}