summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-06-08 18:51:35 +0000
committerThierry Vignaud <tv@mageia.org>2012-06-08 18:51:35 +0000
commit811425d997a4f3b801dd3f35d1b14e08b64c620c (patch)
treeef7071040b4050d6782b853314544773fd978855
parent74691508a941e4df58820b90ae6fd323653cfe59 (diff)
downloadurpmi-811425d997a4f3b801dd3f35d1b14e08b64c620c.tar
urpmi-811425d997a4f3b801dd3f35d1b14e08b64c620c.tar.gz
urpmi-811425d997a4f3b801dd3f35d1b14e08b64c620c.tar.bz2
urpmi-811425d997a4f3b801dd3f35d1b14e08b64c620c.tar.xz
urpmi-811425d997a4f3b801dd3f35d1b14e08b64c620c.zip
(_run_parallel_transaction) split it out of run()
-rw-r--r--urpm/main_loop.pm23
1 files changed, 14 insertions, 9 deletions
diff --git a/urpm/main_loop.pm b/urpm/main_loop.pm
index 6fe3d5cf..fcc47760 100644
--- a/urpm/main_loop.pm
+++ b/urpm/main_loop.pm
@@ -207,6 +207,19 @@ sub _log_installing {
}
}
+sub _run_parallel_transaction {
+ my ($urpm, $state, $test, $transaction_sources, $transaction_sources_install) = @_;
+ $urpm->{print}(N("distributing %s", join(' ', values $transaction_sources_install, values $transaction_sources)));
+ #- no remove are handle here, automatically done by each distant node.
+ $urpm->{log}("starting distributed install");
+ $urpm->{parallel_handler}->parallel_install(
+ $urpm,
+ [ keys %{$state->{rejected} || {}} ], $transaction_sources_install, $transaction_sources,
+ test => $test,
+ excludepath => $urpm->{options}{excludepath}, excludedocs => $urpm->{options}{excludedocs},
+ );
+}
+
# locking is left to callers
sub run {
my ($urpm, $state, $something_was_to_be_done, $ask_unselect, $_requested, $callbacks) = @_;
@@ -303,15 +316,7 @@ sub run {
#- install/remove other packages
if (keys(%transaction_sources_install) || keys(%$transaction_sources) || $set->{remove}) {
if ($parallel) {
- $urpm->{print}(N("distributing %s", join(' ', values %transaction_sources_install, values %$transaction_sources)));
- #- no remove are handle here, automatically done by each distant node.
- $urpm->{log}("starting distributed install");
- $urpm->{parallel_handler}->parallel_install(
- $urpm,
- [ keys %{$state->{rejected} || {}} ], \%transaction_sources_install, $transaction_sources,
- test => $test,
- excludepath => $urpm->{options}{excludepath}, excludedocs => $urpm->{options}{excludedocs},
- );
+ _run_parallel_transaction($urpm, $state, $test, $transaction_sources, \%transaction_sources_install);
} else {
if ($options{verbose} >= 0) {
_log_installing($urpm, \%transaction_sources_install, $transaction_sources);