diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-01-11 17:26:52 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-01-11 17:26:52 +0000 |
commit | d8314d9dd12f1bc40960ee9a498ded4ed9e917a3 (patch) | |
tree | 7c21d95e48ce824e36707cede847a1e014488306 /urpmi.addmedia | |
parent | 8d2124bcbfd6f1d206035c95b2c88054bfae8612 (diff) | |
download | urpmi-d8314d9dd12f1bc40960ee9a498ded4ed9e917a3.tar urpmi-d8314d9dd12f1bc40960ee9a498ded4ed9e917a3.tar.gz urpmi-d8314d9dd12f1bc40960ee9a498ded4ed9e917a3.tar.bz2 urpmi-d8314d9dd12f1bc40960ee9a498ded4ed9e917a3.tar.xz urpmi-d8314d9dd12f1bc40960ee9a498ded4ed9e917a3.zip |
- 5.0
- urpmf, urpmq:
o use xml info instead of hdlist when possible
o "urpmq -l" is faster (3x)
o "urpmf -l" is slower (1.5x)
o "urpmf --sourcerpm" is much faster
o see "xml-info" option in urpmi.cfg(5) to see when those files are downloaded
o new require: perl module XML::LibXML
- urpmq:
o use rpm file instead of hdlist/xml-info when file is local
o use URPM::Package->changelogs (need perl-URPM 3.06)
- urpmi.update, urpmi.addmedia, urpmi.removemedia:
o drop hdlist support replaced with xml media_info
(this imply file-deps are correctly handled, see genhdlist2(1))
- urpmi.addmedia
o new --xml-info option
Diffstat (limited to 'urpmi.addmedia')
-rwxr-xr-x | urpmi.addmedia | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/urpmi.addmedia b/urpmi.addmedia index ba131e6b..897eb1ac 100755 --- a/urpmi.addmedia +++ b/urpmi.addmedia @@ -26,6 +26,7 @@ use urpm::msg; use urpm::download (); use urpm::cfg; use urpm::media; +use urpm::util 'member'; sub usage { my $m = shift; @@ -51,6 +52,8 @@ and [options] are from ") . N(" --proxy-user - specify user and password to use for proxy authentication (format is <user:password>). ") . N(" --update - create an update medium. +") . N(" --xml-info - use the specific policy for downloading xml info files + one of: never, on-demand, update-only, always. cf urpmi.cfg(5) ") . N(" --probe-synthesis - use synthesis file. ") . N(" --probe-rpms - use rpm files (instead of synthesis). ") . N(" --no-probe - do not try to find any synthesis file. @@ -86,6 +89,11 @@ if ($options{mirrors_url}) { } $options{force} = 0; my $urpm = urpm->new_parse_cmdline or usage(); + +if ($options{'xml-info'}) { + member($options{'xml-info'}, urpm::xml_info_policies()) or die N("known xml-info policies are %s", join(', ', urpm::xml_info_policies())) . "\n"; +} + our ($name, $url, $with, $relative_synthesis) = our @cmdline; $options{quiet} = 1 if $options{verbose} < 0; @@ -130,6 +138,7 @@ if ($options{distrib}) { probe_with => $options{probe_with}, nolock => $options{nolock}, ask_media => $add_media_callback, + 'xml-info' => $options{'xml-info'}, ); $ok = urpm::media::update_media($urpm, %options, quiet => $options{verbose} < 0, @@ -150,6 +159,7 @@ if ($options{distrib}) { update => $options{update}, ignore => $options{raw}, nolock => $options{nolock}, + 'xml-info' => $options{'xml-info'}, ); urpm::download::copy_cmd_line_proxy($name); if ($options{raw}) { |