summaryrefslogtreecommitdiffstats
path: root/urpm/install.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-07-08 17:59:25 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-07-08 17:59:25 +0000
commitec49bc330577f2b7535ad658ab0608ecace5a9a2 (patch)
treed8e13b167269a5f89873ee5fe903b46112a0fddb /urpm/install.pm
parentc5dead167a9b7a2ab4e4e226283a379074e8a238 (diff)
downloadurpmi-ec49bc330577f2b7535ad658ab0608ecace5a9a2.tar
urpmi-ec49bc330577f2b7535ad658ab0608ecace5a9a2.tar.gz
urpmi-ec49bc330577f2b7535ad658ab0608ecace5a9a2.tar.bz2
urpmi-ec49bc330577f2b7535ad658ab0608ecace5a9a2.tar.xz
urpmi-ec49bc330577f2b7535ad658ab0608ecace5a9a2.zip
urpm::install::prepare_transaction() now returns the computed values instead of
modifying the parameters
Diffstat (limited to 'urpm/install.pm')
-rw-r--r--urpm/install.pm14
1 files changed, 6 insertions, 8 deletions
diff --git a/urpm/install.pm b/urpm/install.pm
index bebcdd09..db15ae09 100644
--- a/urpm/install.pm
+++ b/urpm/install.pm
@@ -26,16 +26,14 @@ sub _hash_intersect_list {
\%h;
}
-#- prepare transaction.
sub prepare_transaction {
- my ($_urpm, $set, $list, $sources, $transaction_list, $transaction_sources) = @_;
+ my ($_urpm, $set, $list, $sources) = @_;
- foreach (0..$#$list) {
- $transaction_list->[$_] = _hash_intersect_list($list->[$_], $set->{upgrade});
- }
- foreach my $id (@{$set->{upgrade}}) {
- exists $sources->{$id} and $transaction_sources->{$id} = $sources->{$id};
- }
+ my @transaction_list = map {
+ _hash_intersect_list($_, $set->{upgrade});
+ } @$list;
+
+ \@transaction_list, _hash_intersect_list($sources, $set->{upgrade});
}
sub build_transaction_set_ {