diff options
-rwxr-xr-x | urpmi.removemedia | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/urpmi.removemedia b/urpmi.removemedia index dd2791e3..db586211 100755 --- a/urpmi.removemedia +++ b/urpmi.removemedia @@ -28,14 +28,17 @@ sub main { my (@toremoves, %options); $options{noclean} = 1; + $options{strict_match} = 1; foreach (@_) { /^--?a$/ and $options{all} = 1, next; /^--?c$/ and $options{noclean} = 0, next; + /^--?y$/ and $options{strict_match} = 0, next; /^-/ and die N("usage: urpmi.removemedia [-a] <name> ... where <name> is a medium name to remove. ") . N(" --help - print this help message. ") . N(" -a - select all media. ") . N(" -c - clean headers cache directory. +") . N(" -y - fuzzy match on media names. ") . (/^--?h(?:elp)$/ ? '' : N("\nunknown options '%s'\n", $_)); push @toremoves, $_; } @@ -49,7 +52,7 @@ where <name> is a medium name to remove. } @toremoves == 0 and die N("the entry to remove is missing\n(one of %s)\n", join(", ", @entries)); - $urpm->select_media({ strict_match => 1 }, @toremoves); + $urpm->select_media({ strict_match => $options{strict_match} }, @toremoves); $urpm->remove_selected_media; $urpm->update_media(noclean => $options{noclean}); |