summaryrefslogtreecommitdiffstats
path: root/urpmi.removemedia
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-01-17 12:49:48 +0000
committerFrancois Pons <fpons@mandriva.com>2002-01-17 12:49:48 +0000
commit3574a0abc5669246aee3e02a4efeb8617a635ac6 (patch)
treeca5d04a51c266e47d49dd37450ace4bb6d12adc6 /urpmi.removemedia
parent43a2e10ca24e7e3aefc448a81d2b5ecb1ad75a68 (diff)
downloadurpmi-3574a0abc5669246aee3e02a4efeb8617a635ac6.tar
urpmi-3574a0abc5669246aee3e02a4efeb8617a635ac6.tar.gz
urpmi-3574a0abc5669246aee3e02a4efeb8617a635ac6.tar.bz2
urpmi-3574a0abc5669246aee3e02a4efeb8617a635ac6.tar.xz
urpmi-3574a0abc5669246aee3e02a4efeb8617a635ac6.zip
updated help invocation.
added -c (clean) flag. avoid removing header almost all the time.
Diffstat (limited to 'urpmi.removemedia')
-rwxr-xr-xurpmi.removemedia13
1 files changed, 10 insertions, 3 deletions
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] <name> ...
where <name> 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 <name> 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);