Bug 272398 - lang/python: symlink to PYTHON_DEFAULT and/or PYTHON_MAJOR_VER no longer created
Summary: lang/python: symlink to PYTHON_DEFAULT and/or PYTHON_MAJOR_VER no longer created
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-python (Nobody)
URL:
Keywords:
Depends on:
Blocks: 272354
  Show dependency treegraph
 
Reported: 2023-07-06 21:26 UTC by Glen Barber
Modified: 2023-07-12 20:44 UTC (History)
3 users (show)

See Also:
vishwin: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Glen Barber freebsd_committer freebsd_triage 2023-07-06 21:26:04 UTC
It appears, presumably since the update to Python 3 as the default version, the symbolic link for /usr/local/bin/python -> /usr/local/bin/python3{,.9} does not get created.
Comment 1 Charlie Li freebsd_committer freebsd_triage 2023-07-06 22:40:07 UTC
Not running into the issue here. lang/python's symlink goes to lang/python3, which is a dependency, which then goes to the actual default version.
Comment 2 Glen Barber freebsd_committer freebsd_triage 2023-07-07 02:17:02 UTC
I have both lang/python and lang/python3 in src/release/tools/gce.conf, and neither create /usr/local/bin/python:

root@releng1.nyi:/releng/scripts-snapshot/scripts # ls /releng/14-amd64-GENERIC-snap/usr/local/bin/python3.9
python3.9*

root@releng1.nyi:/releng/scripts-snapshot/scripts # ls /releng/14-amd64-GENERIC-snap/usr/local/bin/python
ls: /releng/14-amd64-GENERIC-snap/usr/local/bin/python: No such file or directory

Although as I now look closer, it seems lang/python3 does not create the symlink for /usr/local/bin/python3 -> /usr/local/bin/python3.9 either.
Comment 3 Charlie Li freebsd_committer freebsd_triage 2023-07-07 02:32:37 UTC
The symlinks are created during do-install and the ports are set to NO_BUILD, which is correct as there is literally nothing to build. Assuming DEFAULT_VERSIONS are still their defaults, ${PYTHON_MAJOR_VER} et al should result in the correct values. No problems verifying in poudriere just now.
Comment 4 Glen Barber freebsd_committer freebsd_triage 2023-07-07 02:36:27 UTC
There are no non-default overrides in the environment.  The only reason lang/python3 is explicitly listed is previously both lang/python3 and lang/python2 were needed (before the default version changed).

Some behavioral change has seemingly been introduced in April, at least as noted in PR 272354.
Comment 5 Charlie Li freebsd_committer freebsd_triage 2023-07-07 02:56:55 UTC
The only meaningful changes to the ports themselves happened in 2021 and 2020 respectively. As for python.mk, only PEP-517 support and Python 3.7 removal happened this year.

Checking the official builders, those packages seem to have the correct symlinks.
Comment 6 Glen Barber freebsd_committer freebsd_triage 2023-07-07 03:28:41 UTC
I will run the GCE build manually tomorrow to see what I see with some debugging added.  Something feels very strange here, as neither lang/python or lang/python3, despite the only ones being explicitly listed, do not seem to even be installed.
Comment 7 Antoine Brodin freebsd_committer freebsd_triage 2023-07-07 06:43:28 UTC
I can't reproduce:

# pkg install python
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 2 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        python: 3.9_3,2
        python3: 3_3

Number of packages to be installed: 2

2 KiB to be downloaded.

Proceed with this action? [y/N]: y
[1/2] Fetching python3-3_3.pkg: 100%    1 KiB   1.1kB/s    00:01
[2/2] Fetching python-3.9_3,2.pkg: 100%    996 B   1.0kB/s    00:01
Checking integrity... done (0 conflicting)
[1/2] Installing python3-3_3...
[1/2] Extracting python3-3_3: 100%
[2/2] Installing python-3.9_3,2...
[2/2] Extracting python-3.9_3,2: 100%

# ll /usr/local/bin/python
lrwxr-xr-x  1 root  wheel  7 Jun 24 22:33 /usr/local/bin/python@ -> python3

# ll /usr/local/bin/python3
lrwxr-xr-x  1 root  wheel  9 Jun 23 05:10 /usr/local/bin/python3@ -> python3.9
Comment 8 Glen Barber freebsd_committer freebsd_triage 2023-07-12 20:44:35 UTC
This PR appears to be invalid.

Apologies to all that spent time looking into this.