aboutsummaryrefslogtreecommitdiffstats
path: root/gurpmi.addmedia
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-03-28 10:38:05 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-03-28 10:38:05 +0000
commitef1e913b32c01d82aced47f5d5a6da23fd2d1a28 (patch)
treef664bc6be197b8e5ad42bf2d6a6d952d8ee37d70 /gurpmi.addmedia
parentf1c293fc4ac466d853c1ca95f477bd9cd25f1342 (diff)
downloadrpmdrake-ef1e913b32c01d82aced47f5d5a6da23fd2d1a28.tar
rpmdrake-ef1e913b32c01d82aced47f5d5a6da23fd2d1a28.tar.gz
rpmdrake-ef1e913b32c01d82aced47f5d5a6da23fd2d1a28.tar.bz2
rpmdrake-ef1e913b32c01d82aced47f5d5a6da23fd2d1a28.tar.xz
rpmdrake-ef1e913b32c01d82aced47f5d5a6da23fd2d1a28.zip
- gurpmi.addmedia:
o handle --mirrorlist o drop 'with' parameter, it didn't work properly anymore (Anssi)
Diffstat (limited to 'gurpmi.addmedia')
-rwxr-xr-xgurpmi.addmedia10
1 files changed, 9 insertions, 1 deletions
diff --git a/gurpmi.addmedia b/gurpmi.addmedia
index 77b09361..993891e5 100755
--- a/gurpmi.addmedia
+++ b/gurpmi.addmedia
@@ -40,6 +40,7 @@ and [options] are from
--distrib install a set of media from a distribution
--silent-success don't show popup window on success
--update create an update medium.
+ --mirrorlist <url> is a mirror list
";
exit(0);
};
@@ -64,11 +65,13 @@ if (@ARGV == 1 && $ARGV[0] =~ /\.urpmi-media$/) {
}
my ($update, $distrib, $silent_success) = (0, 0, 0);
+my ($mirrorlist, $with_dir);
GetOptions(
'update' => \$update,
'distrib' => \$distrib,
'silent-success' => \$silent_success,
+ 'mirrorlist=s' => \$mirrorlist,
);
# compatibility with -update:
@@ -82,7 +85,10 @@ my @names;
while (@ARGV) {
my ($name, $url) = @ARGV;
- if ($url !~ m,^(([^:]*):/)?/,) {
+
+ if ($mirrorlist) {
+ ($with_dir, $url) = ($url, undef);
+ } elsif ($url !~ m,^(([^:]*):/)?/,) {
interactive_msg('gurpmi.addmedia',
N("bad <url> (for local directory, the path must be absolute)") . "\n\n$url");
myexit(-1);
@@ -119,6 +125,8 @@ foreach (@addmedia_args) {
$_->[1],
if_(!$distrib, undef),
if_($update, update => $update),
+ mirrorlist => $mirrorlist,
+ 'with-dir' => $with_dir,
);
}
if ($success) {