summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-11-21 14:50:12 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-11-21 14:50:12 +0000
commit4a5c1e8c562dfa7a38a7c2fb29d02a8781c0987f (patch)
tree6d056e5f9e436f4d7c9a590c0f752cf60ac81c90 /urpm.pm
parent9bf2a395e40ada0ab2a798893fe270463429d1a3 (diff)
downloadurpmi-4a5c1e8c562dfa7a38a7c2fb29d02a8781c0987f.tar
urpmi-4a5c1e8c562dfa7a38a7c2fb29d02a8781c0987f.tar.gz
urpmi-4a5c1e8c562dfa7a38a7c2fb29d02a8781c0987f.tar.bz2
urpmi-4a5c1e8c562dfa7a38a7c2fb29d02a8781c0987f.tar.xz
urpmi-4a5c1e8c562dfa7a38a7c2fb29d02a8781c0987f.zip
cleanup
Diffstat (limited to 'urpm.pm')
-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}) {