On Wed, Oct 27, 2021 at 02:43:45PM +0900, Yuichiro NAITO wrote: > I've tried to search python 2.7 package with a branch name. > `pkg_info -Q` fails with following message. > > $ pkg_info -a -Q python%2.7 > Can't locate object method "match" via package > "OpenBSD::Search::FilterLocation" at /usr/libdata/perl5/OpenBSD/Search.pm > line 27. > > It seems that FilterLocation class doesn't have 'match' method. > > I assume that a branch name can be used as same as `pkg_add python%2.7`. > `pkg_add python%2.7` succeeds to install python-2.7 package.
It's not that pkg_info -Q doesn't support %, more precisely, it's that %branch was only added to pkg_add to make it work with pkg_info -z So technically, it's not a bug. The % syntax is only supported in one location currently. I might extend the pkgspec support eventually. Be aware that % support is more expensive in any case since it has to dive into the package instead of the rest of pkgspec which only needs names to function.
