From 77b03c95a1f5f69e5f9c40c1deeb89948192ce43 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Fri, 2 Dec 2005 14:37:37 +0000 Subject: Add new switches to the urpm tools, --wget-options, --curl-options and --rsync-options, to specify additionnal command-line options to pass to the downloader programs. These are also available as global variables that can be set in urpmi.cfg. --- urpm/download.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'urpm/download.pm') diff --git a/urpm/download.pm b/urpm/download.pm index c005ede1..afde787e 100644 --- a/urpm/download.pm +++ b/urpm/download.pm @@ -220,6 +220,7 @@ sub sync_wget { "--no-check-certificate", "--timeout=$CONNECT_TIMEOUT", "-NP", + (defined $options->{'wget-options'} ? split /\s+/, $options->{'wget-options'} : ()), $options->{dir}, @_ ) . " |"; @@ -293,7 +294,9 @@ sub sync_curl { "--stderr", "-", # redirect everything to stdout "--disable-epsv", "--connect-timeout", $CONNECT_TIMEOUT, - "-s", "-I", @ftp_files) . " |"; + "-s", "-I", + (defined $options->{'curl-options'} ? split /\s+/, $options->{'curl-options'} : ()), + @ftp_files) . " |"; while (<$curl>) { if (/Content-Length:\s*(\d+)/) { !$cur_ftp_file || exists($ftp_files_info{$cur_ftp_file}{size}) @@ -353,6 +356,7 @@ sub sync_curl { "-f", "--disable-epsv", "--connect-timeout", $CONNECT_TIMEOUT, + (defined $options->{'curl-options'} ? split /\s+/, $options->{'curl-options'} : ()), "--stderr", "-", # redirect everything to stdout @all_files) . " |"; local $/ = \1; #- read input by only one char, this is slow but very nice (and it works!). @@ -429,6 +433,7 @@ sub sync_rsync { ($options->{compress} ? qw(-z) : @{[]}), ($options->{ssh} ? qw(-e ssh) : @{[]}), qw(--partial --no-whole-file), + (defined $options->{'rsync-options'} ? split /\s+/, $options->{'rsync-options'} : ()), "'$file' '$options->{dir}' |"); local $/ = \1; #- read input by only one char, this is slow but very nice (and it works!). while (<$rsync>) { -- cgit v1.2.1