From 5dd73a30cf61cbe016c60c25bcd2d3e66b34cb14 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 18 Jun 2007 15:55:04 +0000 Subject: help debugging curl/wget commands --- urpm/download.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'urpm') 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 $_; -- cgit v1.2.1