diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-02-23 21:31:09 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-02-23 21:31:09 +0000 |
commit | 14abfdf01bfa2e0872a85ea7ce022d44a6e29fb7 (patch) | |
tree | 12bc24416cea0e35035e76da0e73a473092b6f69 /urpmi.addmedia | |
parent | fac2e70e4020fbd9a545f50e358537a4116c0df1 (diff) | |
download | urpmi-14abfdf01bfa2e0872a85ea7ce022d44a6e29fb7.tar urpmi-14abfdf01bfa2e0872a85ea7ce022d44a6e29fb7.tar.gz urpmi-14abfdf01bfa2e0872a85ea7ce022d44a6e29fb7.tar.bz2 urpmi-14abfdf01bfa2e0872a85ea7ce022d44a6e29fb7.tar.xz urpmi-14abfdf01bfa2e0872a85ea7ce022d44a6e29fb7.zip |
- all tools:
o handle mirrorlist
(need perl-Zone-TimeInfo patched for geolocalisation)
Diffstat (limited to 'urpmi.addmedia')
-rwxr-xr-x | urpmi.addmedia | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/urpmi.addmedia b/urpmi.addmedia index c24759a2..3bf79ba2 100755 --- a/urpmi.addmedia +++ b/urpmi.addmedia @@ -41,6 +41,15 @@ where <url> is one of http://<host>/<path> removable://<path> +usage: urpmi.addmedia [options] --distrib --mirrorlist <url> +usage: urpmi.addmedia [options] --mirrorlist <url> <name> <relative path> + +examples: + + urpmi.addmedia --distrib --mirrorlist '\$MIRRORLIST' + urpmi.addmedia --mirrorlist '\$MIRRORLIST' backports media/main/backports + + and [options] are from ") . N(" --help - print this help message. ") . N(" --wget - use wget to retrieve distant files. @@ -94,11 +103,20 @@ if ($options{'xml-info'}) { } our ($name, $url, $with, $relative_synthesis) = our @cmdline; +my $with_dir; $options{quiet} = 1 if $options{verbose} < 0; $url or ($url, $name) = ($name, ''); -$url =~ m,^(([^:]*):/)?/, or die N("bad <url> (for local directory, the path must be absolute)") . "\n"; +if ($options{mirrorlist}) { + if ($options{distrib}) { + $url and die N("no argument needed for --distrib --mirrorlist <url>") . "\n"; + } else { + ($with_dir, $url) = ($url, undef); + } +} else { + $url =~ m,^(([^:]*):/)?/, or die N("bad <url> (for local directory, the path must be absolute)") . "\n"; +} if ($< != 0) { $urpm->{fatal}(1, N("Only superuser is allowed to add media")); @@ -132,6 +150,7 @@ if ($options{distrib}) { urpm::media::add_distrib_media($urpm, $name, $url, + mirrorlist => $options{mirrorlist}, virtual => $options{virtual}, update => $options{update}, probe_with => $options{probe_with}, @@ -154,6 +173,8 @@ if ($options{distrib}) { urpm::media::add_medium($urpm, $name, $url, $relative_synthesis, + mirrorlist => $options{mirrorlist}, + 'with-dir' => $with_dir, virtual => $options{virtual}, update => $options{update}, ignore => $options{raw}, |