diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-12-04 20:15:14 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-12-04 20:15:14 +0000 |
commit | f5912db2e732b487f6a6c09b3d51622229045f14 (patch) | |
tree | 575d090d68ccb9bde45b279971f60626dfd37ab5 | |
parent | 415363dfe2ae517d8a68471f801c2a040750c65d (diff) | |
download | urpmi-f5912db2e732b487f6a6c09b3d51622229045f14.tar urpmi-f5912db2e732b487f6a6c09b3d51622229045f14.tar.gz urpmi-f5912db2e732b487f6a6c09b3d51622229045f14.tar.bz2 urpmi-f5912db2e732b487f6a6c09b3d51622229045f14.tar.xz urpmi-f5912db2e732b487f6a6c09b3d51622229045f14.zip |
(_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)
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | urpm/select.pm | 4 |
2 files changed, 6 insertions, 3 deletions
@@ -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); |