summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--urpm/parallel_ka_run.pm4
-rw-r--r--urpm/parallel_ssh.pm2
-rw-r--r--urpme17
3 files changed, 15 insertions, 8 deletions
diff --git a/urpm/parallel_ka_run.pm b/urpm/parallel_ka_run.pm
index 2c060c47..1220b392 100644
--- a/urpm/parallel_ka_run.pm
+++ b/urpm/parallel_ka_run.pm
@@ -49,7 +49,7 @@ sub parallel_find_remove {
/^\s*$/ and next;
/Checking to remove the following packages/ and next;
/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));
+ and $urpm->{fatal}(1, urpm::N("node %s has an old version of urpme, please upgrade", $node));
if (/unknown packages?:? (.*)/) {
#- keep in mind unknown package from the node, because it should not be a fatal error
#- if other node have it.
@@ -61,7 +61,7 @@ sub parallel_find_remove {
$base_to_remove{$1} = undef;
} elsif (/removing \S/) {
#- this is log for newer urpme, so do not try to remove removing...
- } elsif (/Removing failed/) {
+ } elsif (/Removal failed/) {
$bad_nodes{$node} = [];
} else {
if (exists $bad_nodes{$node}) {
diff --git a/urpm/parallel_ssh.pm b/urpm/parallel_ssh.pm
index 088804c6..190baa25 100644
--- a/urpm/parallel_ssh.pm
+++ b/urpm/parallel_ssh.pm
@@ -74,7 +74,7 @@ sub parallel_find_remove {
$base_to_remove{$1} = undef;
} elsif (/removing \S/) {
#- this is log for newer urpme, so do not try to remove removing...
- } elsif (/Removing failed/) {
+ } elsif (/Removal failed/) {
$bad_nodes{$node} = [];
} else {
if (exists $bad_nodes{$node}) {
diff --git a/urpme b/urpme
index 991bb712..ba664284 100644
--- a/urpme
+++ b/urpme
@@ -86,16 +86,19 @@ my @toremove = $urpm->find_packages_to_remove(
force => $force,
callback_notfound => sub {
my $urpm = shift @_;
+ #- Warning : the following message is parsed in urpm::parallel_ka_run
$urpm->{fatal}(1, (@_ > 1 ? N("unknown packages") : N("unknown package")) .
': ' . join(', ', @_)); 0 },
callback_fuzzy => sub {
my $urpm = shift @_;
my $match = shift @_;
+ #- Warning : the following message is parsed in urpm::parallel_ka_run
$urpm->{fatal}(1, N("The following packages contain %s: %s",
$match, join(' ', @_))); 0 },
callback_base => sub {
my $urpm = shift @_;
foreach (@_) {
+ #- Warning : the following message is parsed in urpm::parallel_*
$urpm->{error}(N("removing package %s will break your system", $_));
} 0 },
root => $root,
@@ -103,6 +106,7 @@ my @toremove = $urpm->find_packages_to_remove(
my $list = join "\n", $urpm->translate_why_removed($state, sort @toremove);
if ($test && $auto) {
+ #- Warning : the following message is parsed in urpm::parallel_*
my $msg = N("Checking to remove the following packages");
print STDOUT "$msg:\n$list\n";
} elsif (($parallel || @toremove > @l) && !$auto) {
@@ -115,8 +119,11 @@ if ($test && $auto) {
message_input($askok . N(" (y/N) "), $force && $yesexpr, boolean => 1) =~ /[$yesexpr]/ or exit 0;
}
-print STDOUT "\n".N("removing %s", join(' ', sort @toremove))."\n";
-@l = $parallel ?
- $urpm->parallel_remove(\@toremove, test => $test, force => $force, translate_message => 1) :
- $urpm->install(\@toremove, {}, {}, test => $test, force => $force, translate_message => 1);
-@l and $urpm->{fatal}(2, N("Removing failed") . ":\n" . join("\n", map { "\t$_" } @l));
+#- Warning : the following message is parsed in urpm::parallel_*
+print "\n" . N("removing %s", join(' ', sort @toremove)) . "\n";
+@l = $parallel
+ ? $urpm->parallel_remove(\@toremove, test => $test, force => $force, translate_message => 1)
+ : $urpm->install(\@toremove, {}, {}, test => $test, force => $force, translate_message => 1);
+
+#- Warning : the following message is parsed in urpm::parallel_*
+@l and $urpm->{fatal}(2, N("Removal failed") . ":\n" . join("\n", map { "\t$_" } @l));