Incorrect symlink checking => Your python3 install is corrupted.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-release-upgrader (Ubuntu) |
Fix Released
|
Medium
|
Brian Murray | ||
Jammy |
Fix Released
|
Medium
|
Brian Murray |
Bug Description
This is related to https:/
When trying to upgrade to jammy, I got
```
Your python3 install is corrupted. Please fix the '/usr/bin/python3'
symlink.
```
Digging into the matter, it comes down to this symlink checker in `DistUpgradeCon
```
import logging
from configparser import ConfigParser
import os
from configparser import NoOptionError
logging.
def _pythonSymlinkC
""" sanity check that /usr/bin/python3 points to the default
python version. Users tend to modify this symlink, which
breaks stuff in obscure ways (Ubuntu #75557).
"""
logging.
binaries_
for binary, dirname in binaries_
if os.path.
config = ConfigParser()
with open(debian_
try:
except NoOptionError:
try:
except OSError as e:
if not fs_default_version in (expected_default, os.path.
return True
res = _pythonSymlinkC
print(res)
```
Running it indeed returns `False` on my machine. The log gives the reason:
```
DEBUG:root:
DEBUG:root:python3 symlink points to: '/etc/alternati
```
The symlink is not followed through.
Instead of `os.readlink`, you want to use `os.path.realpath`.
tags: | added: rls-jj-incoming |
Changed in ubuntu-release-upgrader (Ubuntu): | |
status: | New → In Progress |
assignee: | nobody → Brian Murray (brian-murray) |
importance: | Undecided → Medium |
tags: | removed: rls-jj-incoming |
This bug was fixed in the package ubuntu- release- upgrader - 1:22.04.3
--------------- release- upgrader (1:22.04.3) jammy; urgency=medium
ubuntu-
* DistUpgrade/ DistUpgradeCont roller. py: switch from using os.readlink to path.realpath when checking for the default python version. Thanks to upgrades: set Prompt to lts as jammy is an LTS release.
os.
Nico Schlömer. (LP: #1953135)
* data/release-
(LP: #1955843)
-- Brian Murray <email address hidden> Wed, 05 Jan 2022 14:27:07 -0800