Specifying & searching of package flavors

parv/freebsd parv.0zero9+freebsd at gmail.com
Fri Apr 16 22:14:46 UTC 2021


On Thu, Apr 15, 2021 at 3:33 PM Graham Perrin wrote:

Hi Graham,

On 16/04/2021 00:18, parv/freebsd wrote:
>
> > On Thu, Apr 15, 2021 at 1:05 PM parv/freebsd wrote:
> >
> >> 1- How does one search for available flavors of a package by partial
> >>     or full package origin?
> >>
> >>    For example, given origin of "devel/lua-stdlib" would install the
> >> packages
> >>    for all available versions of lua (5.1--5.4). Only way I found that
> that
> >>    would be the case is during the actual install.
> >>
> >>    Issues here ...
> >>    - "pkg search lua-stdlib" does not show any results;
> >>    - "pkg install lua-stdlib at lua54" fails to find any available
> packages.
> >> Only
> >>      thing that would work is "lua54-stdlib";
> >>    - to be able to "-x" option, I would need to have prior knowledge to
> use
> >>      "lua.+?stdlib" ( "lua.+?-stdlib" does not work) to give to
> >> pkg-{info,search}.
> >>
> > ...
> >
> > I meant '... "lua.+stdlib" ("lua.+?-stdlib" does not work) to give to
> > pkg-{info,search}'.
>
>
> Not the answer that you want, but I guess that from multiple lines of
> output it's possible to (at least) tell that there _exist_ flavours for
> a port:
>
> % pkg rquery --regex '%o %v %R' lua.+stdlib$ | sort
> devel/lua-stdlib 41.2.2_1 FreeBSD
> devel/lua-stdlib 41.2.2_1 FreeBSD
> devel/lua-stdlib 41.2.2_1 FreeBSD
> devel/lua-stdlib 41.2.2_1 FreeBSD


Heh, you are right on both accounts.

The pkg-rquery syntax is much appreciated.


– then <https://www.freshports.org/devel/lua-stdlib/#flavors>.
>
> (<https://www.freshports.org/faq.php#anchors> lists the in-page anchors
> that are now available in FreshPorts.)
>

I was thinking few days ago that I should ask Dan L if he would have an API
for FreshPorts or if I would need to scrape the web pages.


Old, but maybe relevant:
>
> <
> https://lists.freebsd.org/pipermail/freebsd-ports/2017-December/111841.html
> >
>
>  >> … can't use pkg-query(8) or pkg-rquery(8) or similar to select
>  >> and display packages according to the new metadata items like
>  >> flavor. …
>

Oh man! I was identifying the last quoted response in the email from
Stefan E. Thank you for the link to the past discussion.


(My knowledge of flavours is minimal so if that's no longer relevant,
> sorry.)
>

No worries. I am with you, as I have started learning about "flavor" of a
port earnestly around middle-end of the Mar 2021 with bug 254650.

I think I might have given up on using packages largely as I had installed
poudriere earlier to build ports with options that I want, and requires too
much effort to avoid cruft.


- parv


More information about the freebsd-questions mailing list