diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-09-10 08:15:20 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-09-10 08:15:20 +0000 |
commit | cef435e78585d423f7fdf87d5333c85c32e22557 (patch) | |
tree | 182fcde145c97b020de8164dcda1b3731b65aedc | |
parent | b29f52af997406c51e1551c123327c97363f9704 (diff) | |
download | urpmi-cef435e78585d423f7fdf87d5333c85c32e22557.tar urpmi-cef435e78585d423f7fdf87d5333c85c32e22557.tar.gz urpmi-cef435e78585d423f7fdf87d5333c85c32e22557.tar.bz2 urpmi-cef435e78585d423f7fdf87d5333c85c32e22557.tar.xz urpmi-cef435e78585d423f7fdf87d5333c85c32e22557.zip |
more debug info (rsync cmd)
-rw-r--r-- | urpm/download.pm | 6 |
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>) { |