summaryrefslogtreecommitdiffstats
path: root/urpm/parallel_ssh.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-07-29 14:11:26 +0000
committerFrancois Pons <fpons@mandriva.com>2003-07-29 14:11:26 +0000
commitad519bfbc1d39737ad7a02d002e708c0e432fe03 (patch)
tree9126d06964619fb70141d8ad9760d9b1ff9f489c /urpm/parallel_ssh.pm
parent8595770987b0cd225390a2181b7cdd7c6577a171 (diff)
downloadurpmi-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/parallel_ssh.pm')
-rw-r--r--urpm/parallel_ssh.pm14
1 files changed, 11 insertions, 3 deletions
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}};
}