summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-07-09 21:54:31 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-07-09 21:54:31 +0000
commit7a6cff190ef4edc52107e435b122856713185861 (patch)
treedf2a2554fa6c686ad06057674cd41d4db4b8a7ec
parentea407f4b59023f03509ddd41f0c092be9afec8fd (diff)
downloadurpmi-7a6cff190ef4edc52107e435b122856713185861.tar
urpmi-7a6cff190ef4edc52107e435b122856713185861.tar.gz
urpmi-7a6cff190ef4edc52107e435b122856713185861.tar.bz2
urpmi-7a6cff190ef4edc52107e435b122856713185861.tar.xz
urpmi-7a6cff190ef4edc52107e435b122856713185861.zip
cleanup
-rw-r--r--urpm/parallel_ssh.pm14
1 files changed, 6 insertions, 8 deletions
diff --git a/urpm/parallel_ssh.pm b/urpm/parallel_ssh.pm
index 795c6a99..c2d40786 100644
--- a/urpm/parallel_ssh.pm
+++ b/urpm/parallel_ssh.pm
@@ -146,13 +146,12 @@ sub parallel_install {
my %bad_nodes;
foreach my $node (keys %{$parallel->{nodes}}) {
- local $_;
my $fh = _ssh_urpm($urpm, $node, 'urpmi', "--pre-clean --test --no-verify-rpm --auto " . _nolock($node) . "--synthesis $parallel->{synthesis} $parallel->{line}");
- while ($_ = <$fh>) {
- $bad_nodes{$node} .= $_;
- /Installation failed/ and $bad_nodes{$node} = '';
- /Installation is possible/ and delete $bad_nodes{$node}, last;
+ while (my $s = <$fh>) {
+ $bad_nodes{$node} .= $s;
+ $s =~ /Installation failed/ and $bad_nodes{$node} = '';
+ $s =~ /Installation is possible/ and delete $bad_nodes{$node}, last;
}
close $fh;
}
@@ -172,9 +171,8 @@ sub parallel_install {
my $fh = _ssh_urpm($urpm, $node, 'urpmi', "--no-verify-rpm --auto " . _nolock($node) . "--synthesis $parallel->{synthesis} $line");
local $/ = \1;
- local $_;
- while (<$fh>) {
- print;
+ while (my $s = <$fh>) {
+ print $s;
}
close $fh;
}