From d7f6060aba7df0b4e108aeb70bdc93685c2e2bb0 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Fri, 9 Jul 2004 09:21:53 +0000 Subject: Add an option -y (fuzzy match on media names) in urpmi.removemedia --- urpmi.removemedia | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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] ... where 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 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}); -- cgit v1.2.1