summaryrefslogtreecommitdiffstats
path: root/urpm/download.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-12-02 14:37:37 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-12-02 14:37:37 +0000
commit77b03c95a1f5f69e5f9c40c1deeb89948192ce43 (patch)
tree39e5be3b372a651082c04d04d5970d082f7fcb6f /urpm/download.pm
parentc0c8d35be233c5202cb9e90ecffdd0a33acee2e8 (diff)
downloadurpmi-77b03c95a1f5f69e5f9c40c1deeb89948192ce43.tar
urpmi-77b03c95a1f5f69e5f9c40c1deeb89948192ce43.tar.gz
urpmi-77b03c95a1f5f69e5f9c40c1deeb89948192ce43.tar.bz2
urpmi-77b03c95a1f5f69e5f9c40c1deeb89948192ce43.tar.xz
urpmi-77b03c95a1f5f69e5f9c40c1deeb89948192ce43.zip
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.
Diffstat (limited to 'urpm/download.pm')
-rw-r--r--urpm/download.pm7
1 files changed, 6 insertions, 1 deletions
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>) {