summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-11-13 17:17:54 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-11-13 17:17:54 +0000
commitcc2589e748dbe55e95fad31acb2673ca5063ae28 (patch)
tree2d3b471f8c3c7e8c4a44e5f88d0da64732429a01
parentc445903598110aa7611a29acda82936ea450cc8e (diff)
downloadurpmi-cc2589e748dbe55e95fad31acb2673ca5063ae28.tar
urpmi-cc2589e748dbe55e95fad31acb2673ca5063ae28.tar.gz
urpmi-cc2589e748dbe55e95fad31acb2673ca5063ae28.tar.bz2
urpmi-cc2589e748dbe55e95fad31acb2673ca5063ae28.tar.xz
urpmi-cc2589e748dbe55e95fad31acb2673ca5063ae28.zip
use ->select_media_by_name & ->remove_media instead of ->select_media & ->remove_selected_media
-rwxr-xr-xurpmi.removemedia9
1 files changed, 4 insertions, 5 deletions
diff --git a/urpmi.removemedia b/urpmi.removemedia
index 76d53296..f042ff56 100755
--- a/urpmi.removemedia
+++ b/urpmi.removemedia
@@ -82,12 +82,11 @@ if ($options{all}) {
@toremove or die N("the entry to remove is missing\n(one of %s)\n", join(", ", @entries));
}
-$urpm->select_media({ strict_match => $options{strict_match} }, @toremove);
+my @selected = $urpm->select_media_by_name(\@toremove, { strict_match => $options{strict_match} })
+ or exit 1;
-my $selected = grep { $_->{modified} } @{$urpm->{media}};
-
-$urpm->remove_selected_media;
+$urpm->remove_media(\@selected);
$urpm->update_media(noclean => $options{noclean});
-exit($selected ? 0 : 1);
+exit(0);