summaryrefslogtreecommitdiffstats
path: root/urpm/parallel.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-07-10 16:11:59 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-07-10 16:11:59 +0000
commit53046fcdc6f505401adb0b7f42a2448f0141247a (patch)
tree768f6a24a73da39c6a372fecfd99898632e7d926 /urpm/parallel.pm
parentf3b996d4f7391eff80275af54671651f9de7476d (diff)
downloadurpmi-53046fcdc6f505401adb0b7f42a2448f0141247a.tar
urpmi-53046fcdc6f505401adb0b7f42a2448f0141247a.tar.gz
urpmi-53046fcdc6f505401adb0b7f42a2448f0141247a.tar.bz2
urpmi-53046fcdc6f505401adb0b7f42a2448f0141247a.tar.xz
urpmi-53046fcdc6f505401adb0b7f42a2448f0141247a.zip
fix parsing urpme output
Diffstat (limited to 'urpm/parallel.pm')
-rw-r--r--urpm/parallel.pm26
1 files changed, 9 insertions, 17 deletions
diff --git a/urpm/parallel.pm b/urpm/parallel.pm
index 0654d346..32ff587a 100644
--- a/urpm/parallel.pm
+++ b/urpm/parallel.pm
@@ -140,13 +140,8 @@ sub _find_remove_pre {
sub _parse_urpme_output {
my ($urpm, $state, $node, $s, $notfound, $base_to_remove, $bad_nodes, %options) = @_;
- $s =~ /^\s*$/ and return;
- $s =~ /Checking to remove the following packages/ and return;
-
- $s =~ /To satisfy dependencies, the following packages are going to be removed/
- and $urpm->{fatal}(1, N("node %s has an old version of urpme, please upgrade", $node));
-
- if ($s =~ /unknown packages?:? (.*)/) {
+ if ($s =~ /^\s*$/) {
+ } elsif ($s =~ /unknown packages?:? (.*)/) {
#- remember unknown packages from the node, because it should not be a fatal error
#- if other nodes have it.
$notfound->{$_} = undef foreach split ", ", $1;
@@ -155,18 +150,15 @@ sub _parse_urpme_output {
or delete($state->{rejected}), return 'stop_parse';
} elsif ($s =~ /removing package (.*) will break your system/) {
$base_to_remove->{$1} = undef;
- } elsif ($s =~ /removing \S/) {
- #- this is log for newer urpme, so do not try to remove removing...
+ } elsif ($s =~ /^(removing|testing removal of) (.*)/) {
+ foreach my $fn (split ' ', $2) {
+ $state->{rejected}{$fn}{removed} = 1;
+ $state->{rejected}{$fn}{nodes}{$node} = undef;
+ }
} elsif ($s =~ /Remov(?:al|ing) failed/) {
$bad_nodes->{$node} = [];
- } else {
- if (exists $bad_nodes->{$node}) {
- $s =~ /^\s+(.+)/ and push @{$bad_nodes->{$node}}, $1;
- } else {
- $s =~ s/\s*\(.*//; #- remove reason (too complex to handle, needs to be removed)
- $state->{rejected}{$s}{removed} = 1;
- $state->{rejected}{$s}{nodes}{$node} = undef;
- }
+ } elsif (exists $bad_nodes->{$node}) {
+ $s =~ /^\s+(.+)/ and push @{$bad_nodes->{$node}}, $1;
}
return;
}