diff options
author | Francois Pons <fpons@mandriva.com> | 2003-07-29 14:11:26 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2003-07-29 14:11:26 +0000 |
commit | ad519bfbc1d39737ad7a02d002e708c0e432fe03 (patch) | |
tree | 9126d06964619fb70141d8ad9760d9b1ff9f489c /urpm | |
parent | 8595770987b0cd225390a2181b7cdd7c6577a171 (diff) | |
download | urpmi-ad519bfbc1d39737ad7a02d002e708c0e432fe03.tar urpmi-ad519bfbc1d39737ad7a02d002e708c0e432fe03.tar.gz urpmi-ad519bfbc1d39737ad7a02d002e708c0e432fe03.tar.bz2 urpmi-ad519bfbc1d39737ad7a02d002e708c0e432fe03.tar.xz urpmi-ad519bfbc1d39737ad7a02d002e708c0e432fe03.zip |
fix to handle parallel removing with nodes not having the packages.
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/parallel_ka_run.pm | 14 | ||||
-rw-r--r-- | urpm/parallel_ssh.pm | 14 |
2 files changed, 22 insertions, 6 deletions
diff --git a/urpm/parallel_ka_run.pm b/urpm/parallel_ka_run.pm index cdc43ffc..f489c840 100644 --- a/urpm/parallel_ka_run.pm +++ b/urpm/parallel_ka_run.pm @@ -18,7 +18,7 @@ sub parallel_register_rpms { #- parallel find_packages_to_remove sub parallel_find_remove { my ($parallel, $urpm, $state, $l, %options) = @_; - my ($test, $node, %bad_nodes, %base_to_remove); + my ($test, $node, %bad_nodes, %base_to_remove, %notfound); local (*F, $_); #- keep in mind if the previous selection is still active, it avoid @@ -45,8 +45,9 @@ sub parallel_find_remove { /To satisfy dependencies, the following packages are going to be removed/ and $urpm->{fatal}(1, ("node %s has bad version of urpme, please upgrade", $node)); if (/unknown packages?:? (.*)/) { - $options{callback_notfound} and $options{callback_notfound}->($urpm, split ", ", $1) - or delete $state->{rejected}, last; + #- keep in mind unknown package from the node, because it should not be a fatal error + #- if other node have it. + @notfound{split ", ", $1} = (); } elsif (/The following packages contain ([^:]*): (.*)/) { $options{callback_fuzzy} and $options{callback_fuzzy}->($urpm, $1, split " ", $2) or delete $state->{rejected}, last; @@ -80,6 +81,13 @@ sub parallel_find_remove { } } + #- if at least one node has the package, it should be seen as unknown... + delete @notfound{map { /^(.*)-[^-]*-[^-]*$/ } keys %{$state->{rejected}}}; + if (%notfound) { + $options{callback_notfound} and $options{callback_notfound}->($urpm, keys %notfound) + or delete $state->{rejected}; + } + keys %{$state->{rejected}}; } diff --git a/urpm/parallel_ssh.pm b/urpm/parallel_ssh.pm index 98414ee1..4a3f6ed6 100644 --- a/urpm/parallel_ssh.pm +++ b/urpm/parallel_ssh.pm @@ -21,7 +21,7 @@ sub parallel_register_rpms { #- parallel find_packages_to_remove sub parallel_find_remove { my ($parallel, $urpm, $state, $l, %options) = @_; - my ($test, $node, %bad_nodes, %base_to_remove); + my ($test, $node, %bad_nodes, %base_to_remove, %notfound); local (*F, $_); #- keep in mind if the previous selection is still active, it avoid @@ -48,8 +48,9 @@ sub parallel_find_remove { /To satisfy dependencies, the following packages are going to be removed/ and $urpm->{fatal}(1, ("node %s has bad version of urpme, please upgrade", $node)); if (/unknown packages?:? (.*)/) { - $options{callback_notfound} and $options{callback_notfound}->($urpm, split ", ", $1) - or delete $state->{rejected}, last; + #- keep in mind unknown package from the node, because it should not be a fatal error + #- if other node have it. + @notfound{split ", ", $1} = (); } elsif (/The following packages contain ([^:]*): (.*)/) { $options{callback_fuzzy} and $options{callback_fuzzy}->($urpm, $1, split " ", $2) or delete $state->{rejected}, last; @@ -84,6 +85,13 @@ sub parallel_find_remove { } } + #- if at least one node has the package, it should be seen as unknown... + delete @notfound{map { /^(.*)-[^-]*-[^-]*$/ } keys %{$state->{rejected}}}; + if (%notfound) { + $options{callback_notfound} and $options{callback_notfound}->($urpm, keys %notfound) + or delete $state->{rejected}; + } + keys %{$state->{rejected}}; } |