23/04/2019

do-release-upgrade or don't

I couldn't resist the lure of the Dingo, but it took me some time to get there. Long story short: do-release-upgrade is a picky bitch. It kept and kept and kept coming up with a "Your python3 install is corrupted. Please fix the '/usr/bin/python3' symlink." message. That message is produced by a script downloaded into /tmp during the installation process and IMO *should* just make sure that the /usr/bin/python3 symlink points to a correct python binary (might have to be 3.6). After all, the update scripts have a "#!/usr/bin/python3" header.
However, over the years, people have had to resort to the weirdest workarounds:
  • Make sure /usr/bin/python and /usr/bin/python3 point to python3.6
  • Reinstall default python3 
  • Purge anything done by update-alternatives (sudo update-alternatives --remove-all python)
  • Purge python2.x
Reader, I tried all of them.
update-alternatives --display python
sudo update-alternatives --remove-all python
sudo apt install --reinstall ubuntu-release-upgrader-core
sudo apt install --reinstall python3
sudo ln -sf /usr/bin/python3.6 /usr/bin/python
sudo ln -sf /usr/bin/python3.6 /usr/bin/python3
sudo apt-get remove --purge python2.7-minimal
In the end, purging python2.7 did the trick. That involved uninstalling inkscape and bits of TeXlive, but it was a small list of dependencies that could be reinstalled after the update. Still, a mess. Serves me right for not bothering to do a clean reinstall.

No comments: