summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-06-11 16:25:48 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-06-11 16:25:48 +0000
commitfa1568c5689de4a6a788c44e8a592f334a9c8db0 (patch)
tree6e0af5f9227b029bf53b88b2d1bd923b07dd45d7
parent3a15e73a432c541914cd93d44926c8af54cc0398 (diff)
downloadurpmi-fa1568c5689de4a6a788c44e8a592f334a9c8db0.tar
urpmi-fa1568c5689de4a6a788c44e8a592f334a9c8db0.tar.gz
urpmi-fa1568c5689de4a6a788c44e8a592f334a9c8db0.tar.bz2
urpmi-fa1568c5689de4a6a788c44e8a592f334a9c8db0.tar.xz
urpmi-fa1568c5689de4a6a788c44e8a592f334a9c8db0.zip
wait for total to be given before displaying progress (#31302)
-rw-r--r--urpm/download.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/urpm/download.pm b/urpm/download.pm
index 26bcaa34..18888b44 100644
--- a/urpm/download.pm
+++ b/urpm/download.pm
@@ -262,7 +262,8 @@ sub sync_wget {
$total = '';
} elsif (defined $total && $total eq '' && $buf =~ /^[^:]*:\s+(\d\S*)/) {
$total = $1;
- } elsif (my ($percent, $speed, $eta) = $buf =~ /^\s*(\d+)%.*\s+(\S+)\s+ETA\s+(\S+)\s*[\r\n]$/ms) {
+ } elsif (defined $total && $buf =~ /^\s*(\d+)%.*\s+(\S+)\s+ETA\s+(\S+)\s*[\r\n]$/ms) {
+ my ($percent, $speed, $eta) = ($1, $2, $3);
if (propagate_sync_callback($options, 'progress', $file, $percent, $total, $eta, $speed) eq 'canceled') {
kill 15, $wget_pid;
close $wget;