diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2014-01-24 11:41:24 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2014-01-24 11:41:24 +0000 |
commit | 78c72f07f66899c67ada30fab21ffffa02adb6e1 (patch) | |
tree | 61bbe9c9ac890c0396ad7ae428d5e9bd06a3790e /usr.sbin | |
parent | 59d7b5629c14f0423f04b0a691254d7918f40fd7 (diff) |
subject -z hints (fuzzy update) to quirks' tweak_search.
Reminded by sthen@
This solves the 5.4 -> 5.5 delete/reinstall gap for changed pkgnames.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Update.pm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Update.pm b/usr.sbin/pkg_add/OpenBSD/Update.pm index 273897c22be..2b7f763a05f 100644 --- a/usr.sbin/pkg_add/OpenBSD/Update.pm +++ b/usr.sbin/pkg_add/OpenBSD/Update.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Update.pm,v 1.158 2014/01/11 11:51:01 espie Exp $ +# $OpenBSD: Update.pm,v 1.159 2014/01/24 11:41:23 espie Exp $ # # Copyright (c) 2004-2014 Marc Espie <espie@openbsd.org> # @@ -274,7 +274,13 @@ sub process_hint if (@$l == 0) { my $t = $hint_name; $t =~ s/\-\d([^-]*)\-?/--/; - $l = $set->match_locations(OpenBSD::Search::Stem->new($t), $k); + my @search = (OpenBSD::Search::Stem->new($t)); + $state->run_quirks( + sub { + my $quirks = shift; + $quirks->tweak_search(\@search, $hint, $state); + }); + $l = $set->match_locations(@search, $k); } if (@$l > 1) { my $r = find_nearest($hint_name, $l); |