From 3574a0abc5669246aee3e02a4efeb8617a635ac6 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Thu, 17 Jan 2002 12:49:48 +0000 Subject: updated help invocation. added -c (clean) flag. avoid removing header almost all the time. --- urpmi.removemedia | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'urpmi.removemedia') diff --git a/urpmi.removemedia b/urpmi.removemedia index d6e04cb4..380ce107 100755 --- a/urpmi.removemedia +++ b/urpmi.removemedia @@ -27,12 +27,15 @@ import urpm _; sub main { my (@toremoves, %options); + $options{noclean} = 1; foreach (@_) { /^--?a/ and $options{all} = 1, next; + /^--?c/ and $options{noclean} = 0, next; /^-/ and die _("usage: urpmi.removemedia [-a] ... where is a medium name to remove. - -a select all media. -\nunknown options '%s'\n", $_); +") . _(" -a - select all media. +") . _(" -c - clean headers cache directory. +") . _("\nunknown options '%s'\n", $_); push @toremoves, $_; } @@ -47,7 +50,11 @@ where is a medium name to remove. $urpm->select_media(@toremoves); $urpm->remove_selected_media; - $urpm->update_media(noclean => !$options{all}); + + foreach (grep { !$_->{ignore} && !$_->{with_hdlist} } @{$urpm->{media} || []}) { + $urpm->parse_synthesis($_); + } + $urpm->update_media(noclean => $options{noclean}); } main(@ARGV); -- cgit v1.2.1