diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-06-18 15:55:04 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-06-18 15:55:04 +0000 |
commit | 5dd73a30cf61cbe016c60c25bcd2d3e66b34cb14 (patch) | |
tree | 1a15760fcc3464bc7552d67ce8be03c4788b3042 /urpm/download.pm | |
parent | 48d17aecfbe7938e796fec388f5d357da761cba2 (diff) | |
download | urpmi-5dd73a30cf61cbe016c60c25bcd2d3e66b34cb14.tar urpmi-5dd73a30cf61cbe016c60c25bcd2d3e66b34cb14.tar.gz urpmi-5dd73a30cf61cbe016c60c25bcd2d3e66b34cb14.tar.bz2 urpmi-5dd73a30cf61cbe016c60c25bcd2d3e66b34cb14.tar.xz urpmi-5dd73a30cf61cbe016c60c25bcd2d3e66b34cb14.zip |
help debugging curl/wget commands
Diffstat (limited to 'urpm/download.pm')
-rw-r--r-- | urpm/download.pm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/urpm/download.pm b/urpm/download.pm index 5e471eb4..3fa605ce 100644 --- a/urpm/download.pm +++ b/urpm/download.pm @@ -245,6 +245,7 @@ sub sync_wget { '-P', $options->{dir}, @_ ) . " |"; + $options->{debug} and $options->{debug}($wget_command); my $wget_pid = open(my $wget, $wget_command); local $/ = \1; #- read input by only one char, this is slow but very nice (and it works!). local $_; @@ -329,6 +330,7 @@ sub sync_curl { "--anyauth", (defined $options->{'curl-options'} ? split /\s+/, $options->{'curl-options'} : ()), @ftp_files); + $options->{debug} and $options->{debug}($cmd); open my $curl, "$cmd |"; while (<$curl>) { if (/Content-Length:\s*(\d+)/) { @@ -393,6 +395,7 @@ sub sync_curl { (defined $options->{'curl-options'} ? split /\s+/, $options->{'curl-options'} : ()), "--stderr", "-", # redirect everything to stdout @all_files); + $options->{debug} and $options->{debug}($cmd); my $curl_pid = open(my $curl, "$cmd |"); local $/ = \1; #- read input by only one char, this is slow but very nice (and it works!). local $_; |