Discussion:
Specifying & searching of package flavors
parv/freebsd
2021-04-15 23:05:48 UTC
Permalink
Hi there,

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-***@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}.


2- How do specify the "flavor"s for various packages in a file so that I
would
not need to search or specifically have to specify them to pkg tools?


- parv
parv/freebsd
2021-04-15 23:14:35 UTC
Permalink
On Thu, Apr 15, 2021 at 1:05 PM parv/freebsd wrote:
...
Post by parv/freebsd
2- How do specify the "flavor"s for various packages in a file so that I
would
not need to search or specifically have to specify them to pkg tools?
For example, something installed gcc-{9,10} as dependency, which brought in
binutils
for various platforms. If installed from devel/binutils port, it would have
installed
only "native" flavor instead of multitude of other extraneous versions.

So I would have listed "flavor" in some file (ideally suitable for both pkg
& make) so
that when "binutils" would be installed again, only one version^Wflavor of
it would
have been installed.


- parv

--
parv/freebsd
2021-04-15 23:18:45 UTC
Permalink
Post by parv/freebsd
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;
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}'.


- parv
Graham Perrin
2021-04-16 01:33:37 UTC
Permalink
Post by parv/freebsd
Post by parv/freebsd
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;
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
%

– 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.)

Old, but maybe relevant:

<https://lists.freebsd.org/pipermail/freebsd-ports/2017-December/111841.html>
Post by parv/freebsd
Post by parv/freebsd
… 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. …
(My knowledge of flavours is minimal so if that's no longer relevant,
sorry.)
parv/freebsd
2021-04-16 22:14:07 UTC
Permalink
On Thu, Apr 15, 2021 at 3:33 PM Graham Perrin wrote:

Hi Graham,
Post by parv/freebsd
Post by parv/freebsd
Post by parv/freebsd
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
Post by parv/freebsd
Post by parv/freebsd
would be the case is during the actual install.
Issues here ...
- "pkg search lua-stdlib" does not show any results;
packages.
Post by parv/freebsd
Post by parv/freebsd
Only
thing that would work is "lua54-stdlib";
- to be able to "-x" option, I would need to have prior knowledge to
use
Post by parv/freebsd
Post by parv/freebsd
"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
% 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>.
Post by parv/freebsd
(<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.
Post by parv/freebsd
<
https://lists.freebsd.org/pipermail/freebsd-ports/2017-December/111841.html
Post by parv/freebsd
Post by parv/freebsd
… 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,
Post by parv/freebsd
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

Loading...