diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-08-31 16:44:55 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-08-31 16:44:55 +0000 |
commit | 6a91695cbe85fb81a4833ed3be293908a239e9c6 (patch) | |
tree | a47caf622c42e14d46c4df8c1830dc8191588fd2 | |
parent | 21e469488b292865885c4278dcb46d9e4b84a48d (diff) | |
download | urpmi-6a91695cbe85fb81a4833ed3be293908a239e9c6.tar urpmi-6a91695cbe85fb81a4833ed3be293908a239e9c6.tar.gz urpmi-6a91695cbe85fb81a4833ed3be293908a239e9c6.tar.bz2 urpmi-6a91695cbe85fb81a4833ed3be293908a239e9c6.tar.xz urpmi-6a91695cbe85fb81a4833ed3be293908a239e9c6.zip |
(clean_trans_sources_from_src_packages) split it out of run()
-rw-r--r-- | urpm/main_loop.pm | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/urpm/main_loop.pm b/urpm/main_loop.pm index 77ee4fef..c0ca6f0b 100644 --- a/urpm/main_loop.pm +++ b/urpm/main_loop.pm @@ -150,6 +150,16 @@ sub _install_src { } } +sub clean_trans_sources_from_src_packages { + my ($urpm, $transaction_sources_install, $transaction_sources) = @_; + foreach ($transaction_sources_install, $transaction_sources) { + foreach my $id (keys %$_) { + my $pkg = $urpm->{depslist}[$id] or next; + $pkg->arch eq 'src' and delete $_->{$id}; + } + } +} + sub _continue_on_error { my ($urpm, $callbacks, $msgs, $error_sources, $formatted_errors) = @_; my $go_on; @@ -375,12 +385,7 @@ sub run { next if $no_install; #- clean to remove any src package now. - foreach (\%transaction_sources_install, $transaction_sources) { - foreach my $id (keys %$_) { - my $pkg = $urpm->{depslist}[$id] or next; - $pkg->arch eq 'src' and delete $_->{$id}; - } - } + clean_trans_sources_from_src_packages($urpm, \%transaction_sources_install, $transaction_sources); #- install/remove other packages if (keys(%transaction_sources_install) || keys(%$transaction_sources) || $set->{remove}) { |