summaryrefslogtreecommitdiffstats
path: root/urpm/select.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-10-15 15:14:47 +0000
committerThierry Vignaud <tv@mageia.org>2012-10-15 15:14:47 +0000
commit413ad7c8df4840d2c87e6cbf3709d8b96b5355b9 (patch)
treefb3e7e1df0406f78b93627c31890f85c0af56c3b /urpm/select.pm
parent74e00829c00fbcc5ba092bf4ba1c1d5b6e7c5fd8 (diff)
downloadurpmi-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.pm7
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;
}