diff options
author | Francois Pons <fpons@mandriva.com> | 2003-08-26 14:07:23 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2003-08-26 14:07:23 +0000 |
commit | 60fe56c55c0dc72c723723e2fc10e9480a1ffd09 (patch) | |
tree | 9a6bfbd60c621725a8b0eb06e07d6b1c8426ed87 /urpm.pm | |
parent | 717ff0a00896c553f04eac6b7497fa3884f7633d (diff) | |
download | urpmi-60fe56c55c0dc72c723723e2fc10e9480a1ffd09.tar urpmi-60fe56c55c0dc72c723723e2fc10e9480a1ffd09.tar.gz urpmi-60fe56c55c0dc72c723723e2fc10e9480a1ffd09.tar.bz2 urpmi-60fe56c55c0dc72c723723e2fc10e9480a1ffd09.tar.xz urpmi-60fe56c55c0dc72c723723e2fc10e9480a1ffd09.zip |
added -z option for rsync:// protocol
fixed download progressive glitches loging.
Diffstat (limited to 'urpm.pm')
-rw-r--r-- | urpm.pm | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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"; } |