From d3864b76594c22507114055a7838a1018add0846 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Tue, 17 Jun 2003 11:13:40 +0000 Subject: 4.4-2mdk --- urpm/parallel_ka_run.pm | 16 +++++++++------- urpm/parallel_ssh.pm | 16 +++++++++------- 2 files changed, 18 insertions(+), 14 deletions(-) (limited to 'urpm') diff --git a/urpm/parallel_ka_run.pm b/urpm/parallel_ka_run.pm index d80e292e..68e5c80b 100644 --- a/urpm/parallel_ka_run.pm +++ b/urpm/parallel_ka_run.pm @@ -24,13 +24,13 @@ sub parallel_find_remove { #- keep in mind if the previous selection is still active, it avoid #- to re-start urpme --test on each node. if ($options{find_packages_to_remove}) { - delete $state->{ask_remove}; + delete $state->{rejected}; delete $urpm->{error_remove}; $test = '--test '; } else { @{$urpm->{error_remove} || []} and return @{$urpm->{error_remove}}; #- no need to restart what has been started before. - $options{test} and return keys %{$state->{ask_remove}}; + $options{test} and return keys %{$state->{rejected}}; $test = ''; } @@ -46,10 +46,10 @@ sub parallel_find_remove { 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->{ask_remove}, last; + or delete $state->{rejected}, last; } elsif (/The following packages contain ([^:]*): (.*)/) { $options{callback_fuzzy} and $options{callback_fuzzy}->($urpm, $1, split " ", $2) - or delete $state->{ask_remove}, last; + or delete $state->{rejected}, last; } elsif (/removing package (.*) will break your system/) { $base_to_remove{$1} = undef; } elsif (/Removing failed/) { @@ -58,7 +58,8 @@ sub parallel_find_remove { if (exists $bad_nodes{$node}) { /^\s+(.*)/ and push @{$bad_nodes{$node}}, $1; } else { - $state->{ask_remove}{$_}{$node} = undef; + $state->{rejected}{$_}{removed} = 1; + $state->{rejected}{$_}{nodes}{$node} = undef; } } } @@ -77,7 +78,7 @@ sub parallel_find_remove { } } - keys %{$state->{ask_remove}}; + keys %{$state->{rejected}}; } #- parallel resolve_dependencies @@ -139,7 +140,8 @@ sub parallel_resolve_dependencies { chomp; s/<([^>]*)>.*:->:(.*)/$2/ and $node = $1; if (/^\@removing\@(.*)/) { - $state->{ask_remove}{$1}{$node} = undef; + $state->{rejected}{$1}{removed} = 1; + $state->{rejected}{$1}{nodes}{$node} = undef; } elsif (/\|/) { #- distant urpmq returned a choices, check if it has already been chosen #- or continue iteration to make sure no more choices are left. diff --git a/urpm/parallel_ssh.pm b/urpm/parallel_ssh.pm index e92380a7..a0831c14 100644 --- a/urpm/parallel_ssh.pm +++ b/urpm/parallel_ssh.pm @@ -27,13 +27,13 @@ sub parallel_find_remove { #- keep in mind if the previous selection is still active, it avoid #- to re-start urpme --test on each node. if ($options{find_packages_to_remove}) { - delete $state->{ask_remove}; + delete $state->{rejected}; delete $urpm->{error_remove}; $test = '--test '; } else { @{$urpm->{error_remove} || []} and return @{$urpm->{error_remove}}; #- no need to restart what has been started before. - $options{test} and return keys %{$state->{ask_remove}}; + $options{test} and return keys %{$state->{rejected}}; $test = ''; } @@ -49,10 +49,10 @@ sub parallel_find_remove { 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->{ask_remove}, last; + or delete $state->{rejected}, last; } elsif (/The following packages contain ([^:]*): (.*)/) { $options{callback_fuzzy} and $options{callback_fuzzy}->($urpm, $1, split " ", $2) - or delete $state->{ask_remove}, last; + or delete $state->{rejected}, last; } elsif (/removing package (.*) will break your system/) { $base_to_remove{$1} = undef; } elsif (/Removing failed/) { @@ -61,7 +61,8 @@ sub parallel_find_remove { if (exists $bad_nodes{$node}) { /^\s+(.*)/ and push @{$bad_nodes{$node}}, $1; } else { - $state->{ask_remove}{$_}{$node} = undef; + $state->{rejected}{$_}{removed} = 1; + $state->{rejected}{$_}{nodes}{$node} = undef; } } } @@ -81,7 +82,7 @@ sub parallel_find_remove { } } - keys %{$state->{ask_remove}}; + keys %{$state->{rejected}}; } #- parallel resolve_dependencies @@ -143,7 +144,8 @@ sub parallel_resolve_dependencies { while (defined ($_ = )) { chomp; if (/^\@removing\@(.*)/) { - $state->{ask_remove}{$1}{$node} = undef; + $state->{rejected}{$1}{removed} = 1; + $state->{rejected}{$1}{nodes}{$node} = undef; } elsif (/\|/) { #- distant urpmq returned a choices, check if it has already been chosen #- or continue iteration to make sure no more choices are left. -- cgit v1.2.1