From 60fe56c55c0dc72c723723e2fc10e9480a1ffd09 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Tue, 26 Aug 2003 14:07:23 +0000 Subject: added -z option for rsync:// protocol fixed download progressive glitches loging. --- urpm.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'urpm.pm') diff --git a/urpm.pm b/urpm.pm index 4f7c1857..662f6343 100644 --- a/urpm.pm +++ b/urpm.pm @@ -320,7 +320,7 @@ sub sync_rsync { open RSYNC, join(" ", map { "'$_'" } "/usr/bin/rsync", ($limit_rate ? "--bwlimit=$limit_rate" : ()), (ref($options) && $options->{quiet} ? qw(-q) : qw(--progress -v)), - qw(--partial --no-whole-file), $file, (ref($options) ? $options->{dir} : $options)) . " |"; + qw(--partial -z --no-whole-file), $file, (ref($options) ? $options->{dir} : $options)) . " |"; local $/ = \1; #- read input by only one char, this is slow but very nice (and it works!). while () { $buf .= $_; @@ -389,11 +389,13 @@ sub sync_logger { if ($mode eq 'start') { print STDERR " $file\n"; } elsif ($mode eq 'progress') { + my $text; if (defined $total && defined $eta) { - print STDERR N(" %s%% of %s completed, ETA = %s, speed = %s", $percent, $total, $eta, $speed) . "\r"; + $text = N(" %s%% of %s completed, ETA = %s, speed = %s", $percent, $total, $eta, $speed); } else { - print STDERR N(" %s%% completed, speed = %s", $percent, $speed) . "\r"; + $text = N(" %s%% completed, speed = %s", $percent, $speed); } + print STDERR " " x (79 - length($text)) . "\r"; } elsif ($mode eq 'end') { print STDERR " " x 79, "\r"; } -- cgit v1.2.1