summaryrefslogtreecommitdiffstats
path: root/urpmi.removemedia
diff options
context:
space:
mode:
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)));
}