summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-03-15 13:11:49 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-03-15 13:11:49 +0000
commit1a89f0bda9a72fce1076000c8ad5c1d8680f7faa (patch)
tree9161d4589521b8fbad227890c4e8792676a2cd7e /urpm
parent2d40401387190fc6f7cef917b5d7138748d73530 (diff)
downloadurpmi-1a89f0bda9a72fce1076000c8ad5c1d8680f7faa.tar
urpmi-1a89f0bda9a72fce1076000c8ad5c1d8680f7faa.tar.gz
urpmi-1a89f0bda9a72fce1076000c8ad5c1d8680f7faa.tar.bz2
urpmi-1a89f0bda9a72fce1076000c8ad5c1d8680f7faa.tar.xz
urpmi-1a89f0bda9a72fce1076000c8ad5c1d8680f7faa.zip
fix typo in regexp
Diffstat (limited to 'urpm')
-rw-r--r--urpm/parallel_ka_run.pm18
1 files changed, 15 insertions, 3 deletions
diff --git a/urpm/parallel_ka_run.pm b/urpm/parallel_ka_run.pm
index fd8a7ced..e8b81074 100644
--- a/urpm/parallel_ka_run.pm
+++ b/urpm/parallel_ka_run.pm
@@ -62,7 +62,7 @@ sub parallel_find_remove {
open my $fh, "$rshp_command -v $parallel->{options} -- urpme --no-locales --auto $test" . join(' ', map { "'$_'" } @$l) . " 2>&1 |";
while (<$fh>) {
chomp;
- s/<([^>]*)>.*:->:(.*)/$2/ and $node = $1;
+ ($_, $node) = _parse_rshp_output($_) or next;
/^\s*$/ and next;
/Checking to remove the following packages/ and next;
/To satisfy dependencies, the following packages are going to be removed/
@@ -177,7 +177,7 @@ sub parallel_resolve_dependencies {
open my $fh, "$rshp_command -v $parallel->{options} -- urpmq --synthesis $synthesis -fduc $line " . join(' ', keys %chosen) . " |";
while (<$fh>) {
chomp;
- s/<([^>]*)>.*:->:(.*)/$2/ and $node = $1;
+ ($_, $node) = _parse_rshp_output($_) or next;
if (my ($action, $what) = /^\@([^\@]*)\@(.*)/) {
if ($action eq 'removing') {
$state->{rejected}{$what}{removed} = 1;
@@ -227,7 +227,7 @@ sub parallel_install {
open my $fh, "$rshp_command -v $parallel->{options} -- urpmi --pre-clean --no-locales --test --no-verify-rpm --auto --synthesis $parallel->{synthesis} $parallel->{line} |";
while (<$fh>) {
chomp;
- s/<([^>]*)>.*:->:(.*)/$2/ and $node = $1;
+ ($_, $node) = _parse_rshp_output($_) or next;
/^\s*$/ and next;
$bad_nodes{$node} .= $_;
/Installation failed/ and $bad_nodes{$node} = '';
@@ -252,6 +252,18 @@ sub parallel_install {
}
}
+sub _parse_rshp_output {
+ my ($s) = @_;
+ #- eg of output of rshp2: <tata2.mandriva.com> [rank:2]:@removing@mpich-1.2.5.2-10mlcs4.x86_64
+
+ if ($s =~ /<([^>]*)>.*:->:(.*)/ || $s =~ /<([^>]*)>\s*\[[^]]*\]:(.*)/) {
+ ($1, $2);
+ } else {
+ warn "bad rshp output $s\n";
+ ();
+ }
+}
+
#- allow to bootstrap from urpmi code directly (namespace is urpm).
package urpm;