summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-11-04 09:11:26 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-11-04 09:11:26 +0000
commit1859dd175dcd701cc8b06931b47ac09d542d1b00 (patch)
tree0d3b91e20e904501fa59656882b6c918c04a6164
parent45e2221e8747c8c85f92dcc967e729be36631f6d (diff)
downloadurpmi-1859dd175dcd701cc8b06931b47ac09d542d1b00.tar
urpmi-1859dd175dcd701cc8b06931b47ac09d542d1b00.tar.gz
urpmi-1859dd175dcd701cc8b06931b47ac09d542d1b00.tar.bz2
urpmi-1859dd175dcd701cc8b06931b47ac09d542d1b00.tar.xz
urpmi-1859dd175dcd701cc8b06931b47ac09d542d1b00.zip
Only show progress bar if there is a routine to show a progress bar.
-rw-r--r--urpm/parallel_ssh.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/urpm/parallel_ssh.pm b/urpm/parallel_ssh.pm
index e1ede130..01467baf 100644
--- a/urpm/parallel_ssh.pm
+++ b/urpm/parallel_ssh.pm
@@ -231,7 +231,7 @@ sub parallel_install {
#- continue installation on each nodes.
foreach my $node (keys %{$parallel->{nodes}}) {
$urpm->{ui_msg}("parallel_ssh: ssh $node urpmi --no-locales --no-verify-rpm --auto --synthesis $parallel->{synthesis} $line", urpm::N("Performing install on %s...", $node));
- $urpm->{ui}{progress}->(0);
+ $urpm->{ui}{progress}->(0) if ref $urpm->{ui}{progress};
open F, "ssh $node urpmi --no-locales --no-verify-rpm --auto --synthesis $parallel->{synthesis} $line |";
local $/ = \1;
my $log;
@@ -244,7 +244,7 @@ sub parallel_install {
if ($urpm->{ui} && (gettimeofday() - $last_time > 0.15 || length($progress) == 50)) {
$urpm->{ui}{msg}->($msg =~ /\d+:(\S+)/ ? urpm::N("Installing %s on %s...", $1, $node)
: urpm::N("Preparing install on %s...", $node));
- $urpm->{ui}{progress}->(length($progress)/50);
+ $urpm->{ui}{progress}->(length($progress)/50) if ref $urpm->{ui}{progress};
$last_time = gettimeofday();
}
}