summaryrefslogtreecommitdiffstats
path: root/urpmi.removemedia
diff options
context:
space:
mode:
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);