summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm8
1 files changed, 5 insertions, 3 deletions
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 (<RSYNC>) {
$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";
}