summaryrefslogtreecommitdiffstats
path: root/urpmi.removemedia
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-04-24 19:34:32 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-04-24 19:34:32 +0000
commit4df7583caa71a35d6d68c373fc0c62d1be6d955b (patch)
treebddf36169b314d82ff20036dea7e47fa4fec5bcd /urpmi.removemedia
parent7a606ec3537b2f465f8e06e99b445c756bfcca8f (diff)
downloadurpmi-4df7583caa71a35d6d68c373fc0c62d1be6d955b.tar
urpmi-4df7583caa71a35d6d68c373fc0c62d1be6d955b.tar.gz
urpmi-4df7583caa71a35d6d68c373fc0c62d1be6d955b.tar.bz2
urpmi-4df7583caa71a35d6d68c373fc0c62d1be6d955b.tar.xz
urpmi-4df7583caa71a35d6d68c373fc0c62d1be6d955b.zip
re-sync after the big svn loss
Diffstat (limited to 'urpmi.removemedia')
-rwxr-xr-xurpmi.removemedia11
1 files changed, 9 insertions, 2 deletions
diff --git a/urpmi.removemedia b/urpmi.removemedia
index 00af3991..54474da9 100755
--- a/urpmi.removemedia
+++ b/urpmi.removemedia
@@ -43,6 +43,7 @@ where <name> is a medium name to remove.
") . N(" -y - fuzzy match on media names.
") . N(" -q - quiet mode.
") . N(" -v - verbose mode.
+") . N(" --urpmi-root - use another root for urpmi db & rpm installation.
") . $msg;
exit 0;
}
@@ -71,8 +72,14 @@ my @entries = map { $_->{name} } @{$urpm->{media}};
my @toremove;
if ($options{all}) {
- !@cmdline or usage('');
- @toremove = @entries or die N("nothing to remove (use urpmi.addmedia to add a media)\n");
+ if (@cmdline) {
+ usage('');
+ } elsif (!@entries) {
+ print STDERR N("nothing to remove (use urpmi.addmedia to add a media)\n");
+ exit 0;
+ } else {
+ @toremove = @entries;
+ }
} else {
@toremove = @cmdline or usage(N("the entry to remove is missing\n(one of %s)\n", join(", ", @entries)));
}