On 2024/03/21 23:11, Sebastian Reitenbach wrote:
> Hi,
> 
> found that pkg_info -I supports %branch notation, in contrast to -Q:
> root@galen:/tmp# pkg_info -Q postfix%stable35 
> Can't locate object method "match" via package 
> "OpenBSD::Search::FilterLocation" at /usr/libdata/perl5/OpenBSD/Search.pm 
> line 25.
> root@galen:/tmp# pkg_info -Q postfix%snapshot 
> Can't locate object method "match" via package 
> "OpenBSD::Search::FilterLocation" at /usr/libdata/perl5/OpenBSD/Search.pm 
> line 25.
> root@galen:/tmp# pkg_info -I postfix%snapshot 
> postfix-3.8.6v0-ldap fast, secure sendmail replacement

The snapshot dir of Postfix was removed, there's now just stable35
(the last version that can be built with libressl) and stable.

> root@galen:/tmp# pkg_info -I postfix%stable35 
> postfix-3.5.25      fast, secure sendmail replacement
> postfix-3.5.25-ldap fast, secure sendmail replacement
> postfix-3.5.25-mysql fast, secure sendmail replacement
> postfix-3.5.25-pgsql fast, secure sendmail replacement
> postfix-3.5.25-sasl2 fast, secure sendmail replacement
> postfix-3.5.25-sasl2-ldap fast, secure sendmail replacement
> postfix-3.5.25-sasl2-mysql fast, secure sendmail replacement
> postfix-3.5.25-sasl2-pgsql fast, secure sendmail replacement
> root@galen:/tmp# pkg_info -I postfix          
> postfix-3.8.6v0-ldap fast, secure sendmail replacement
> root@galen:/tmp# pkg_info -Q postfix 
> postfix-3.5.25
> postfix-3.5.25-ldap
> postfix-3.5.25-mysql
> postfix-3.5.25-pgsql
> postfix-3.5.25-sasl2
> postfix-3.5.25-sasl2-ldap
> postfix-3.5.25-sasl2-mysql
> postfix-3.5.25-sasl2-pgsql
> postfix-3.8.6v0
> postfix-3.8.6v0-ldap (installed)
> postfix-3.8.6v0-mysql
> postfix-3.8.6v0-pgsql
> postfix-3.8.6v0-sasl2
> postfix-3.8.6v0-sasl2-ldap
> postfix-3.8.6v0-sasl2-mysql
> postfix-3.8.6v0-sasl2-pgsql
> postfix-policyd-spf-perl-2.011
> 
> however, as the example shows, when a package of a branch supporting flavors 
> is installed, using -I pkgname%branch only the installed package is returned, 
> as compared checking for a branch that is not installed, then all flavors are 
> listed.
> My expectation rather for the installed branch would be to also list all 
> available packages, no?

There are probably valid use cases for both. Note, you can do this:

$ pkg_info -I postfix%stable
postfix-3.8.6v0     fast, secure sendmail replacement
$ PKG_DBDIR=/var/empty pkg_info -I postfix%stable
postfix-3.8.6v0     fast, secure sendmail replacement
postfix-3.8.6v0-ldap fast, secure sendmail replacement
postfix-3.8.6v0-mysql fast, secure sendmail replacement
postfix-3.8.6v0-pgsql fast, secure sendmail replacement
postfix-3.8.6v0-sasl2 fast, secure sendmail replacement
postfix-3.8.6v0-sasl2-ldap fast, secure sendmail replacement
postfix-3.8.6v0-sasl2-mysql fast, secure sendmail replacement
postfix-3.8.6v0-sasl2-pgsql fast, secure sendmail replacement

> Or would it rather make sense to have pkg_add -Q support %branch notation?

That would probably be handy.

> Second topic: pkg_add postfix%snapshot works well, but can't this way to 
> force to install a given flavor:

You're hitting some default-case handling by using %snapshot because
that ports subdir no longer exists.

> pkg_add postfix%snapshot--ldap 
> So can't easily install a flavor of a given branch in one command, or am I 
> missing something?

postfix--ldap%stable

Reply via email to