diff options
Diffstat (limited to 'urpm/select.pm')
-rw-r--r-- | urpm/select.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/urpm/select.pm b/urpm/select.pm index e25b0754..b10a8192 100644 --- a/urpm/select.pm +++ b/urpm/select.pm @@ -184,7 +184,7 @@ sub _search_packages { #- we found a non-exact match $result = 'substring'; } - foreach (values %l) { + $name2ids{$v} = join('|', map { my $best; foreach (@$_) { if ($best && $best != $_) { @@ -193,9 +193,8 @@ sub _search_packages { $best = $_; } } - my @l = grep { $_->fullname eq $best->fullname } @$_; - $name2ids{$v} = join('|', map { $_->id } @l); - } + map { $_->id } grep { $_->fullname eq $best->fullname } @$_; + } values %l); } } } |