php applications, php flavors and freshports

From: Luca Pizzamiglio <pizzamig_at_freebsd.org>
Date: Sat, 06 Nov 2021 11:47:27 UTC
Hi all,

Recently I received a bug (
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259672) and I'm unsure
about how to proceed.

The problem: installing a php application
The first suggestion in freshports is to use the format: pkg install origin
Because of multiple flavours, 3 packages are identified by pkg (-php73,
-php74, -php80).
For instance:
  pkg install benchmarks/phoronix-test-suite
  pkg install devel/arcanist

This doesn't happen with python, where only py38 packages are provided,
even if 5 different python3 flavors are available.
For instance:
  pkg install archivers/py-brotli

It seems to me that:
* pkg install origin, when multiple packages are available, could have a
different behavior. Installing all flavors doesn't seem the user's
intention (my personal opinion, I could be wrong), but pkg won't know which
flavour to install.
* because of this 1:n relationship between origin and packages, freshport
could avoid to suggest "pkg install origin" as installation method
* php flavor and python flavor have this small difference: by default, all
php flavours are built, while only one python3 flavor is built. I'm sure
this is intended and it has very good reasons, but it seems the origin of
this confusion.

What do you think we should do to improve the situation?

Best regards,
pizzamig