summaryrefslogtreecommitdiffstats
path: root/urpm.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.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.pm')
-rw-r--r--urpm.pm12
1 files changed, 8 insertions, 4 deletions
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};