summaryrefslogtreecommitdiffstats
path: root/urpmi.removemedia
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-05-29 07:30:32 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-05-29 07:30:32 +0000
commitce597d6a01fda649be99c7fae25a0604bdefa23c (patch)
treeb65380f6ae301ab9660d3d4728c48fec4eaef7be /urpmi.removemedia
parentef337715b4b8124322d5bb458dc9686da7d8fb8b (diff)
downloadurpmi-ce597d6a01fda649be99c7fae25a0604bdefa23c.tar
urpmi-ce597d6a01fda649be99c7fae25a0604bdefa23c.tar.gz
urpmi-ce597d6a01fda649be99c7fae25a0604bdefa23c.tar.bz2
urpmi-ce597d6a01fda649be99c7fae25a0604bdefa23c.tar.xz
urpmi-ce597d6a01fda649be99c7fae25a0604bdefa23c.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)));
}