summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-07-10 11:45:53 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-07-10 11:45:53 +0000
commit3cf4af2f1bc0f043f512d676526779c94ad1451c (patch)
tree7dc40c81842785a703b5d319757017d4a1febe74 /urpm
parent41cd26588f5e8f23073b07b0617a059fcba10b87 (diff)
downloadurpmi-3cf4af2f1bc0f043f512d676526779c94ad1451c.tar
urpmi-3cf4af2f1bc0f043f512d676526779c94ad1451c.tar.gz
urpmi-3cf4af2f1bc0f043f512d676526779c94ad1451c.tar.bz2
urpmi-3cf4af2f1bc0f043f512d676526779c94ad1451c.tar.xz
urpmi-3cf4af2f1bc0f043f512d676526779c94ad1451c.zip
factorize error handling into _run_mput()
Diffstat (limited to 'urpm')
-rw-r--r--urpm/parallel_ka_run.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/urpm/parallel_ka_run.pm b/urpm/parallel_ka_run.pm
index 3f5d1f79..ba549e00 100644
--- a/urpm/parallel_ka_run.pm
+++ b/urpm/parallel_ka_run.pm
@@ -60,6 +60,7 @@ sub _run_mput {
my @l = (split(' ', $parallel->{options}), '--', @para);
$urpm->{log}("parallel_ka_run: $mput_command " . join(' ', @l));
system $mput_command, @l;
+ $? == 0 || $? == 256 or $urpm->{fatal}(1, N("mput failed, maybe a node is unreacheable"));
}
#- parallel copy
@@ -67,7 +68,6 @@ sub parallel_register_rpms {
my ($parallel, $urpm, @files) = @_;
_run_mput($urpm, $parallel, @files, "$urpm->{cachedir}/rpms/");
- $? == 0 || $? == 256 or $urpm->{fatal}(1, N("mput failed, maybe a node is unreacheable"));
urpm::parallel::post_register_rpms($parallel, $urpm, @files);
}
@@ -78,7 +78,7 @@ sub parallel_resolve_dependencies {
#- first propagate the synthesis file to all machines
_run_mput($urpm, $parallel, $synthesis, $synthesis);
- $? == 0 || $? == 256 or $urpm->{fatal}(1, N("mput failed, maybe a node is unreacheable"));
+
$parallel->{synthesis} = $synthesis;
my $line = urpm::parallel::simple_resolve_dependencies($parallel, $urpm, $state, $requested, %options);
@@ -107,7 +107,6 @@ sub parallel_install {
my ($parallel, $urpm, undef, $install, $upgrade, %options) = @_;
_run_mput($urpm, $parallel, values %$install, values %$upgrade, "$urpm->{cachedir}/rpms/");
- $? == 0 || $? == 256 or $urpm->{fatal}(1, N("mput failed, maybe a node is unreacheable"));
my (%bad_nodes);
$parallel->urpm_popen($urpm, 'urpmi', "--pre-clean --test --no-verify-rpm --auto --synthesis $parallel->{synthesis} $parallel->{line}", sub {