diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-07-04 13:04:31 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-07-04 13:04:31 +0000 |
commit | 11c6dd5ec517b539234cb183f804f7b5893cbba7 (patch) | |
tree | 7f3ee270c8e3dc30c0236d4be8eb419a5d537bef /URPM | |
parent | 4294365db5d78909ae5a490e0714db379502cd80 (diff) | |
download | perl-URPM-11c6dd5ec517b539234cb183f804f7b5893cbba7.tar perl-URPM-11c6dd5ec517b539234cb183f804f7b5893cbba7.tar.gz perl-URPM-11c6dd5ec517b539234cb183f804f7b5893cbba7.tar.bz2 perl-URPM-11c6dd5ec517b539234cb183f804f7b5893cbba7.tar.xz perl-URPM-11c6dd5ec517b539234cb183f804f7b5893cbba7.zip |
- handle $state->{orphans_to_remove} in selected_size() and
build_transaction_set()
Diffstat (limited to 'URPM')
-rw-r--r-- | URPM/Resolve.pm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index ecc27fb..34ac590 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -1434,6 +1434,10 @@ sub _selected_size_filesize { $size -= $_->{size}; } + foreach (@{$state->{orphans_to_remove} || []}) { + $size -= $_->size; + } + $size, $bad_filesize ? 0 : $filesize; } @@ -1876,6 +1880,11 @@ sub build_transaction_set { }; } + if ($state->{orphans_to_remove}) { + my @l = map { scalar $_->fullname } @{$state->{orphans_to_remove}}; + push @{$state->{transaction}}, { remove => \@l }; + } + $state->{transaction}; } |