diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-07-10 11:45:53 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-07-10 11:45:53 +0000 |
commit | 3cf4af2f1bc0f043f512d676526779c94ad1451c (patch) | |
tree | 7dc40c81842785a703b5d319757017d4a1febe74 /urpm | |
parent | 41cd26588f5e8f23073b07b0617a059fcba10b87 (diff) | |
download | urpmi-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.pm | 5 |
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 { |