summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-01-17 11:39:12 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-01-17 11:39:12 +0000
commitaf7637f44d8b40f1945607f12f1b066a54dc6a8b (patch)
tree39c0ba637befefc59c968e2b0dbc2243e409b4b1
parent28e1e09b989001e7af04ec8180a5cb380be02586 (diff)
downloadurpmi-af7637f44d8b40f1945607f12f1b066a54dc6a8b.tar
urpmi-af7637f44d8b40f1945607f12f1b066a54dc6a8b.tar.gz
urpmi-af7637f44d8b40f1945607f12f1b066a54dc6a8b.tar.bz2
urpmi-af7637f44d8b40f1945607f12f1b066a54dc6a8b.tar.xz
urpmi-af7637f44d8b40f1945607f12f1b066a54dc6a8b.zip
- all tools:
o deprecate --curl and --wget in favor of --downloader curl and --downloader --wget
-rw-r--r--NEWS4
-rw-r--r--pod/urpmi.8.pod11
-rw-r--r--urpm/args.pm8
-rwxr-xr-xurpmi9
4 files changed, 17 insertions, 15 deletions
diff --git a/NEWS b/NEWS
index 48060cfa..9839788b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+- all tools:
+ o deprecate --curl and --wget in favor of --downloader curl
+ and --downloader --wget
+
Version 5.1 - 16 January 2008, by Pascal "Pixel" Rigaux
- urpmf, urpmq:
diff --git a/pod/urpmi.8.pod b/pod/urpmi.8.pod
index 5acc4190..fbdd52bb 100644
--- a/pod/urpmi.8.pod
+++ b/pod/urpmi.8.pod
@@ -243,15 +243,10 @@ Configure urpmi on the fly from a distrib tree, useful to install a chroot
with the B<--root> option. See the description of the B<--distrib> option
in the C<urpmi.addmedia> manpage.
-=item B<--wget>
+=item B<--downloader> I<program name>
-Use wget for downloading distant files via http or ftp. By default curl is
-used if available, or wget instead.
-
-=item B<--curl>
-
-Use curl for downloading distant files via http or ftp. By default curl is
-used if available, or wget instead.
+Use a specific program for downloading distant files via http or ftp.
+By default curl is used if available, or wget instead.
=item B<--curl-options> I<'options'>
diff --git a/urpm/args.pm b/urpm/args.pm
index cc403a3f..b2542bd7 100644
--- a/urpm/args.pm
+++ b/urpm/args.pm
@@ -106,10 +106,14 @@ my %options_spec = (
'allow-nodeps' => sub { $urpm->{options}{'allow-nodeps'} = 1 },
'allow-force' => sub { $urpm->{options}{'allow-force'} = 1 },
'parallel=s' => \$::parallel,
+
+ # deprecated in favor of --downloader xxx
wget => sub { $urpm->{options}{downloader} = 'wget' },
curl => sub { $urpm->{options}{downloader} = 'curl' },
prozilla => sub { $urpm->{options}{downloader} = 'prozilla' },
aria2 => sub { $urpm->{options}{downloader} = 'aria2' },
+ 'downloader=s' => sub { $urpm->{options}{downloader} = $_[1] },
+
'curl-options=s' => sub { $urpm->{options}{'curl-options'} = $_[1] },
'rsync-options=s' => sub { $urpm->{options}{'rsync-options'} = $_[1] },
'wget-options=s' => sub { $urpm->{options}{'wget-options'} = $_[1] },
@@ -361,7 +365,7 @@ foreach my $k ("help|h", "version", "no-locales", "update", "media|mediums=s",
$options_spec{urpmf}{$k} = $options_spec{urpmi}{$k};
}
-foreach my $k ("help|h", "version", "wget", "curl", "prozilla", "aria2", "proxy=s", "proxy-user=s",
+foreach my $k ("help|h", "version", "wget", "curl", "prozilla", "aria2", 'downloader=s', "proxy=s", "proxy-user=s",
'limit-rate=s',
"wget-options=s", "curl-options=s", "rsync-options=s", "prozilla-options=s", "aria2-options=s")
{
@@ -369,7 +373,7 @@ foreach my $k ("help|h", "version", "wget", "curl", "prozilla", "aria2", "proxy=
$options_spec{urpmq}{$k} = $options_spec{urpmi}{$k};
}
-foreach my $k ("help|h", "wget", "curl", "prozilla", "aria2", "proxy=s", "proxy-user=s", "f", "z",
+foreach my $k ("help|h", "wget", "curl", "prozilla", "aria2", 'downloader=s', "proxy=s", "proxy-user=s", "f", "z",
"limit-rate=s", "no-md5sum", "update", "norebuild!", "probe-rpms",
"wget-options=s", "curl-options=s", "rsync-options=s", "prozilla-options=s", "aria2-options=s", '<>')
{
diff --git a/urpmi b/urpmi
index b745dd6a..b3ecf84c 100755
--- a/urpmi
+++ b/urpmi
@@ -111,11 +111,10 @@ usage:
") . N(" --urpmi-root - use another root for urpmi db & rpm installation.
") . N(" --use-distrib - configure urpmi on the fly from a distrib tree, useful
to install a chroot with --root option.
-") . N(" --wget - use wget to retrieve distant files.
-") . N(" --curl - use curl to retrieve distant files.
-") . N(" --aria2 - use aria2 to retrieve distant files.
-") . N(" --prozilla - use prozilla to retrieve distant files.
-") . N(" --curl-options - additional options to pass to curl
+") . N(" --downloader - program to use to retrieve distant files.
+ known programs: %s
+", join(', ', urpm::download::ftp_http_downloaders()))
+ . N(" --curl-options - additional options to pass to curl
") . N(" --rsync-options- additional options to pass to rsync
") . N(" --wget-options - additional options to pass to wget
") . N(" --prozilla-options - additional options to pass to prozilla