From cef435e78585d423f7fdf87d5333c85c32e22557 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 10 Sep 2007 08:15:20 +0000 Subject: more debug info (rsync cmd) --- urpm/download.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'urpm/download.pm') 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>) { -- cgit v1.2.1