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.pm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'urpm.pm') diff --git a/urpm.pm b/urpm.pm index 0f481f71..34198243 100644 --- a/urpm.pm +++ b/urpm.pm @@ -58,11 +58,9 @@ sub new { } #- syncing algorithms. -#- currently wget and curl methods are implemented; trying to find the best -#- (and one which will work :-) sub sync_webfetch { - my $urpm = shift @_; - my $options = shift @_; + my $urpm = shift; + my $options = shift; my %files; #- currently ftp and http protocols are managed by curl or wget, #- ssh and rsync protocols are managed by rsync *AND* ssh. @@ -77,6 +75,9 @@ sub sync_webfetch { $urpm->{fatal}(10, $@) if $@; delete @files{qw(removable file)}; } + for my $cpt (qw(wget-options curl-options rsync-options)) { + $options->{$cpt} = $urpm->{options}{$cpt} if defined $urpm->{options}{$cpt}; + } if ($files{ftp} || $files{http} || $files{https}) { my @webfetch = qw(curl wget); my @available_webfetch = grep { -x "/usr/bin/$_" } @webfetch; @@ -174,6 +175,9 @@ sub read_config { split-level strict-arch verify-rpm + curl-options + rsync-options + wget-options )) { if (defined $config->{''}{$opt} && !exists $urpm->{options}{$opt}) { $urpm->{options}{$opt} = $config->{''}{$opt}; -- cgit v1.2.1