From f5912db2e732b487f6a6c09b3d51622229045f14 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 4 Dec 2012 20:15:14 +0000 Subject: (_search_packages) do not attempt fuzzy matching if not using --fuzzy it's also a huge speedup (saves 28% of time spent in testsuite) this fixes urpmq defaulting to fuzzy mode (mga#2953) --- NEWS | 5 +++++ urpm/select.pm | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 995c8823..7826832f 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ +- library speedups when looking up packages: + o do not attempt fuzzy matching if not requested +- urpmq: + o do not allow substring matching with --fuzzy (mga#2953) + Version 7.12.1 - 4 December 2012, by Thierry Vignaud - urpmi: diff --git a/urpm/select.pm b/urpm/select.pm index 416c2fd7..553353d5 100644 --- a/urpm/select.pm +++ b/urpm/select.pm @@ -178,14 +178,12 @@ sub _search_packages { if (!$options{fuzzy}) { if ($pack eq $v) { $exact{$v} = $id; - next; } elsif ($pack_a eq $v) { push @{$exact_a{$v}}, $id; - next; } elsif ($pack_ra eq $v || $options{src} && $pack_name eq $v) { push @{$exact_ra{$v}}, $id; - next; } + next; } if ($pack =~ /$qv/) { next if member($pack, @found); -- cgit v1.2.1