py3versions doesn't follow symlinks (like realpath)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python3-defaults (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
In case if we have more than one python version and manage them by update-
root@devvm-
lrwxrwxrwx 1 root root 25 Apr 4 08:11 /usr/bin/python3 -> /etc/alternativ
root@devvm-
lrwxrwxrwx 1 root root 18 Apr 4 08:11 /etc/alternativ
So even we use the correct default version of python3 (like in Focal it is python3.8) py3version will fail
root@devvm-
py3versions: the symlink /usr/bin/python3 does not point to the python3 default version. It must be reset to point to python3.8
This caused due to os.readlink doesn't follow multiply symlinks, so I suggest to use Path from pathlib.
I have attached patch with suggested changes.
The attachment "py3versions.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]