Re: git: 988da7290c99 - main - ./UPDATING: mention the python default version change

From: Baptiste Daroussin <bapt_at_freebsd.org>
Date: Mon, 03 Jun 2024 15:09:27 UTC
On Mon 03 Jun 10:07, Joseph Mingrone wrote:
> On Mon, 2024-06-03 at 15:45, Baptiste Daroussin <bapt@freebsd.org> wrote:
> 
> > On Wed 29 May 14:20, Ruslan Makhmatkhanov wrote:
> >> The branch main has been updated by rm:
> 
> >> URL: https://cgit.FreeBSD.org/ports/commit/?id=988da7290c997a29581bb828bd59257060d8ddbc
> 
> >> commit 988da7290c997a29581bb828bd59257060d8ddbc
> >> Author:     Ruslan Makhmatkhanov <rm@FreeBSD.org>
> >> AuthorDate: 2024-05-29 14:20:07 +0000
> >> Commit:     Ruslan Makhmatkhanov <rm@FreeBSD.org>
> >> CommitDate: 2024-05-29 14:20:07 +0000
> 
> >>     ./UPDATING: mention the python default version change
> >> ---
> >>  UPDATING | 33 +++++++++++++++++++++++++++++++++
> >>  1 file changed, 33 insertions(+)
> 
> >> diff --git a/UPDATING b/UPDATING
> >> index 7a5fc11c35ec..f0077905cb2d 100644
> >> --- a/UPDATING
> >> +++ b/UPDATING
> >> @@ -5,6 +5,39 @@ they are unavoidable.
> >>  You should get into the habit of checking this file for changes each time
> >>  you update your ports collection, before attempting any port upgrades.
> 
> >> +20240529:
> >> +  AFFECTS: users of python
> >> +  AUTHOR: rm@FreeBSD.org
> >> +
> >> +  The default version of python3 and python was switched to 3.11.
> >> +
> >> +  For ports users wanting to keep version 3.9 as default,
> >> +  add DEFAULT_VERSIONS+= python=3.9 python3=3.9 to make.conf
> >> +
> >> +  Following procedures may ease the upgrade:
> >> +
> >> +  For users of pre-build packages:
> >> +  # sh
> >> +  # for i in $(pkg query -g %n 'py39-*'); do pkg set -yn ${i}:py311-${i#py39-}; done
> 
> > I don't think it is a good advice at all, pkg set should not be necessary at
> > all, what case are we trying to fix by providing this advice?
> 
> A user has the package py39-blah, which was explicitly installed.  Now,
> when the user does `pkg upgrade`, py311-blah won't replace py39-blah.
> IMO, that's a problem.
> 
> We gave similar advice when the emacs ports had version information in
> the package name (other than PKGVERSION at the end).

And I find the advice on emacs problematic as well and make things complicated
for users.

In the case of python, final packages should not wear a pyXXX prefix, so during
upgrades for users pkg upgrade will just propose to install the new set of
dependencies which will conflicts with the old one and as such propose to remove
them. (this is not done in the python world, at least not always and causes tons
of problems).

I am not an emacs user so I don't know what have been done there and can't
argue.

In any case the pkg set was a transition tool to cope with areas where we have
"weak" packaging rules, which means each time pkg set is necessary we have to
think how we can fix our packaging rules instead.

Best regards,
Bapt