tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: make php to multi packages
Takahiro Kambe <taca%NetBSD.org@localhost> writes:
> Hi,
>
> In message <C776B2A0-0C88-4F38-9FAF-C0A4D09ACB4C%fessel.org@localhost>
> on Mon, 10 Feb 2025 13:38:55 +0100,
> oskar%fessel.org@localhost wrote:
>>>> PHP_VERSION_DEFAULT now takes precedence over the installed PHP, breaking nearly all of my builds.
>>>> While this is possibly self-inflicted by building and installing php83 from lang/php83, it is somewhat unexpected.
>>>> Previously phpversion.mk checked what version was installed and selected the appropriate DEFAULT, it is now set to 82.
>>>> From the cvs log it is clear, that the version check is not happening anymore.
>
> I'm sorry for your inconvenience.
>
> Locally, I revivied PHP_CHECK_INSTALLED support diffrenet way.
>
> (1) Only one lang/php?? package is installed,
> (2) PHP_VERSION_DEFAULT is not defined in mk.conf exlicitly,
> (3) Use installed lang/php?? ad PHP_VERSION.
>
> Do you think that (2) is required or not?
I am not really following.
It sounds like you are trying to have php detect if there is a version
installed, and essentially treat that as if the user had defined
PHP_VERSION_DEFAULT.
I see this as adding a way to work around not setting
PHP_VERSION_DEFAULT, when really it's easy to set. And, it is
different from how python works.
Additionally, it's fragile. Suppose php82 is default, but someone wants
php83 and installs it, and builds some packages. Then they install a
package that accepts only php80, so that gest installed. The next
package they build will use php82 because there are two.
It seems much simpler to just have people set PHP_VERSION_DEFAULT if
they don't want the pkgsrc-specified default, and it leads to very well
understood easy to explain behavior.
Home |
Main Index |
Thread Index |
Old Index