diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-10-15 15:14:47 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-10-15 15:14:47 +0000 |
commit | 413ad7c8df4840d2c87e6cbf3709d8b96b5355b9 (patch) | |
tree | fb3e7e1df0406f78b93627c31890f85c0af56c3b /urpm/select.pm | |
parent | 74e00829c00fbcc5ba092bf4ba1c1d5b6e7c5fd8 (diff) | |
download | urpmi-413ad7c8df4840d2c87e6cbf3709d8b96b5355b9.tar urpmi-413ad7c8df4840d2c87e6cbf3709d8b96b5355b9.tar.gz urpmi-413ad7c8df4840d2c87e6cbf3709d8b96b5355b9.tar.bz2 urpmi-413ad7c8df4840d2c87e6cbf3709d8b96b5355b9.tar.xz urpmi-413ad7c8df4840d2c87e6cbf3709d8b96b5355b9.zip |
(_search_packages) make it clearer
Diffstat (limited to 'urpm/select.pm')
-rw-r--r-- | urpm/select.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/urpm/select.pm b/urpm/select.pm index 2273ffe1..83798f24 100644 --- a/urpm/select.pm +++ b/urpm/select.pm @@ -147,15 +147,16 @@ sub _search_packages { if (!$options{fuzzy}) { #- try to search through provides. - if (my @l = map { + my @l = map { $_ && ($options{src} ? $_->arch eq 'src' : $_->is_arch_compat) && ($options{use_provides} || $_->name eq $v) && defined($_->id) && (!$urpm->{searchmedia} || pkg_in_searchmedia($urpm, $_)) ? $_ : @{[]}; - } $urpm->packages_providing($v)) - { + } $urpm->packages_providing($v); + + if (@l) { $exact{$v} = _search_packages_keep_best($v, \@l, $options{all}); next; } |