commit 54a0e7a4e69284026224eb7602ffc134b2bed169 Author: tv Date: Mon Oct 29 15:55:57 2012 +0100 add --download-dir option diff --git a/NEWS b/NEWS index cd3abbe..ce32b83 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ +- urpmi.cfg: + o add download-dir option +- urpmi: + o add --download-dir option + Version 7.10 - 17 October 2012, by Thierry Vignaud - do not offer to remove DKMS modules for current kernel (mga#5092) diff --git a/pod/5/urpmi.cfg.pod b/pod/5/urpmi.cfg.pod index baf35fb..515d462 100644 --- a/pod/5/urpmi.cfg.pod +++ b/pod/5/urpmi.cfg.pod @@ -94,6 +94,13 @@ installing into the specified directory. If you want to use the default location, assign an empty string to it (WARNING! "yes" or "1" are NOT the options you really want to use here!) +=item B + +Same as B<--download-dir> option for urpmi: specify to download remote packages +before installing them into the specified directory. If you want to use the default +location, assign an empty string to it (WARNING! "yes" or "1" are NOT the +options you really want to use here!) + =item B Specify which download program to use: B or B. diff --git a/pod/8/urpmi.pod b/pod/8/urpmi.pod index c9fd27a..4b2e39e 100644 --- a/pod/8/urpmi.pod +++ b/pod/8/urpmi.pod @@ -265,6 +265,13 @@ option is set, urpmi will first download all the needed packages and proceed to install them if it managed to download them all. You can optionally specify a directory where the files should be downloaded (default is /var/cache/urpmi which could be too small to hold all the files). +=item B<--download-dir> I + +By default, urpmi will download packages in a system directory (default is +/var/cache/urpmi). This can be problematic when someone just want to download +packages as user witout installing them. When this option is set, urpmi +download the needed packages in the specified directory. + =item B<--downloader> I Use a specific program for downloading distant files via http or ftp. diff --git a/urpm/args.pm b/urpm/args.pm index 4120155..01e99f4 100644 --- a/urpm/args.pm +++ b/urpm/args.pm @@ -128,6 +128,7 @@ my %options_spec = ( 'metalink!' => sub { $urpm->{options}{metalink} = $_[1] }, 'download-all:s' => sub { $urpm->{options}{'download-all'} = $_[1] }, + 'download-dir=s' => sub { $urpm->{options}{cachedir} = $_[1] }, # deprecated in favor of --downloader xxx wget => sub { $urpm->{options}{downloader} = 'wget' }, curl => sub { $urpm->{options}{downloader} = 'curl' }, diff --git a/urpm/cfg.pm b/urpm/cfg.pm index 75487c9..df00dc3 100644 --- a/urpm/cfg.pm +++ b/urpm/cfg.pm @@ -160,6 +160,7 @@ sub load_config_raw { |retry |default-media |download-all + |download-dir |tune-rpm |(?:curl|rsync|wget|prozilla|aria2)-options )\s*:\s*['"]?(.*?)['"]?$/x) { diff --git a/urpmi b/urpmi index cf6f8c0..f515f94 100755 --- a/urpmi +++ b/urpmi @@ -108,6 +108,7 @@ sub usage () { to install a chroot with --root option. ") . N(" --metalink - generate and use a local metalink. ") . N(" --download-all - download all needed packages before trying to install them +") . N(" --download-dir - download the needed packages in the specified directory ") . N(" --downloader - program to use to retrieve distant files. known programs: %s ", join(', ', urpm::download::ftp_http_downloaders()))