summaryrefslogtreecommitdiffstats
path: root/urpm/download.pm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm/download.pm')
-rw-r--r--urpm/download.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/urpm/download.pm b/urpm/download.pm
index 79707205..25de2046 100644
--- a/urpm/download.pm
+++ b/urpm/download.pm
@@ -466,14 +466,16 @@ sub sync_rsync {
do {
local $_;
my $buf = '';
- open my $rsync, join(" ", "/usr/bin/rsync",
+ my $cmd = join(" ", "/usr/bin/rsync",
($limit_rate ? "--bwlimit=$limit_rate" : @{[]}),
($options->{quiet} ? qw(-q) : qw(--progress -v)),
($options->{compress} ? qw(-z) : @{[]}),
($options->{ssh} ? qq(-e $options->{ssh}) : @{[]}),
qw(--partial --no-whole-file --no-motd),
(defined $options->{'rsync-options'} ? split /\s+/, $options->{'rsync-options'} : ()),
- "'$file' '$options->{dir}' 2>&1 |");
+ "'$file' '$options->{dir}' 2>&1");
+ $options->{debug} and $options->{debug}($cmd);
+ open(my $rsync, "$cmd |");
local $/ = \1; #- read input by only one char, this is slow but very nice (and it works!).
local $_;
while (<$rsync>) {