summaryrefslogtreecommitdiffstats
path: root/urpmi
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-01-26 22:20:57 +0000
committerOlivier Blin <oblin@mandriva.org>2004-01-26 22:20:57 +0000
commitc9fdb6d4e5b72adba69f81692ee12c2e20366a85 (patch)
tree927d0f51c84340976d6ae781f31aba59eca43835 /urpmi
parent80f4f65fcc51e585aa165e95710b37194b5ae5a3 (diff)
downloadurpmi-c9fdb6d4e5b72adba69f81692ee12c2e20366a85.tar
urpmi-c9fdb6d4e5b72adba69f81692ee12c2e20366a85.tar.gz
urpmi-c9fdb6d4e5b72adba69f81692ee12c2e20366a85.tar.bz2
urpmi-c9fdb6d4e5b72adba69f81692ee12c2e20366a85.tar.xz
urpmi-c9fdb6d4e5b72adba69f81692ee12c2e20366a85.zip
add downloader option in global config section
Diffstat (limited to 'urpmi')
-rwxr-xr-xurpmi11
1 files changed, 2 insertions, 9 deletions
diff --git a/urpmi b/urpmi
index c6cb6e87..996b5c84 100755
--- a/urpmi
+++ b/urpmi
@@ -38,7 +38,6 @@ my $split_level = 20;
my $split_length = 1;
my $force = 0;
my $parallel = '';
-my $sync;
my $X = 0;
my $WID = 0;
my $all = 0;
@@ -178,11 +177,8 @@ while (defined($_ = shift @argv)) {
/^--allow-nodeps$/ and do { $urpm->{options}{'allow-nodeps'} = 1; next };
/^--allow-force$/ and do { $urpm->{options}{'allow-force'} = 1; next };
/^--parallel$/ and do { push @nextargv, \$parallel; next };
- /^--wget$/ and do { $sync = sub { my $options = shift @_;
- if (ref $options) { $options->{prefer} = 'wget' }
- else { $options = { dir => $options, prefer => 'wget' } }
- urpm::sync_webfetch($options, @_) }; next };
- /^--curl$/ and do { $sync = \&urpm::sync_webfetch; next };
+ /^--wget$/ and do { $urpm->{options}{downloader} = 'wget'; next };
+ /^--curl$/ and do { $urpm->{options}{downloader} = 'curl'; next };
/^--limit-rate$/ and do { push @nextargv, \$urpm->{options}{'limit-rate'}; next };
/^--proxy$/ and do {
my ($proxy, $port) = ($_ = shift @argv) =~ m,^(?:http://)?([^:]+(:\d+)?)/*$, or
@@ -316,9 +312,6 @@ if ($log) {
open SAVEERR, ">&STDERR"; select SAVEERR; $| = 1;
}
-#- use specific sync routine.
-$sync and $urpm->{sync} = $sync;
-
#- remove verbose if not asked.
unless ($bug) {
$urpm->{fatal} = sub { printf SAVEERR "%s\n", $_[1]; exit($_[0]) };