diff options
author | Olivier Blin <oblin@mandriva.org> | 2004-01-26 22:20:57 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2004-01-26 22:20:57 +0000 |
commit | c9fdb6d4e5b72adba69f81692ee12c2e20366a85 (patch) | |
tree | 927d0f51c84340976d6ae781f31aba59eca43835 /urpmq | |
parent | 80f4f65fcc51e585aa165e95710b37194b5ae5a3 (diff) | |
download | urpmi-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 'urpmq')
-rwxr-xr-x | urpmq | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -120,11 +120,8 @@ while (defined($_ = shift @ARGV)) { /^--root$/ and do { push @nextargv, \$query->{root}; next }; /^--use-distrib$/ and do { push @nextargv, \$query->{usedistrib}; next }; /^--parallel$/ and do { push @nextargv, \$query->{parallel}; next }; - /^--wget$/ and do { $urpm->{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 { $urpm->{sync} = \&urpm::sync_webfetch; next }; + /^--wget$/ and do { $urpm->{options}{downloader} = 'wget'; next }; + /^--curl$/ and do { $urpm->{options}{downloader} = 'curl'; next }; /^--proxy$/ and do { my ($proxy, $port) = ($_ = shift @ARGV) =~ m,^(?:http://)?([^:]+(:\d+)?)/*$, or die N("bad proxy declaration on command line\n"); |