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.
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.
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.
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.
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.
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.
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.
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
This PR appears to be invalid. Apologies to all that spent time looking into this.