summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--urpm.pm8
1 files changed, 3 insertions, 5 deletions
diff --git a/urpm.pm b/urpm.pm
index 903380a4..258540f7 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -650,11 +650,9 @@ sub configure {
}
if ($options{searchmedia}) {
$urpm->select_media($options{searchmedia}); #- Ensure this media has been selected
- foreach (grep { !$_->{ignore} } @{$urpm->{media} || []}) {
- $_->{name} eq $options{searchmedia} and do {
- $_->{searchmedia} = 1;
- last;
- };
+ if (my $medium = name2medium($urpm, $options{searchmedia})) {
+ $medium->{ignore} and $urpm->{fatal}("searchmedia is ignored");
+ $medium->{searchmedia} = 1;
}
}
if ($options{excludemedia}) {