Hej, > Am 10.02.2025 um 13:08 schrieb Greg Troxel <gdt%lexort.com@localhost>: > > oskar%fessel.org@localhost writes: > >>>> ftp://www.back-street.net/pub/pkgsrc/pkgsrc-php-2025012000.diff.xz > >> 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 understand where you are coming from, but I don't see how detecting > the installed version makes sense in a multi-version world. I see where you are coming from, but i have yet to discover the benefit of having multiple php versions installed. But, yes, that could come in handy in case something not exposed to the internet works only with some older php version that probably is unmaintained but still useful or needed. > > I would expect php to work like python; each package has a variable of > what's accepted, and there's a configured default. > > By installing php83, you were in the old method saying you wanted 83. > What happens if you just set PHP_VERSION_DEFAULT in mk.conf? Then it works as expected. I just noted that the behaviour changed. > >> That leaves me personally with the question on how to build other php >> versions in case the need arises when i have to set DEFAULT to 83 to >> keep my system unfragmented (and not build php82 and be unable to >> install that because it conflicts with php83…) > > In python we have PYTHON_VERSION_REQD which you can pass to any > particular package. As a package developer, sure. But as a pkgsrc user it may come in as a surprise that you get multiple php versions installed, because some packages require some other version. > I don't follow "not build 82“. That came from the last pkgrrxx run that suddenly built php82 for php-curl instead of updating the installed php83-curl. And php82 could not be installed because it conflicted with the installed php83. Probably a dependency problem because pkgrrxx did not update php83 before building php82. But that was fine with me - it highlighted the issue before any more packages got updated. While at it, would it be advisable to copy existing configurations to the new directories before updating php?? so the update will not overwrite that? Wouldn’t that be nice if the install script would handle that case, i.e. check for „old“ config and copy that over to the „new“ config and leave a message in the old config dir that „config for php83 is now in /usr/pkg/etc/php83“ and „please check your ap-php config for the updated names!“ If i only hat time to write that right now… Cheers Oskar
Attachment:
smime.p7s
Description: S/MIME cryptographic signature