Ubuntu support for EOL release upgrades
Background
- https://twitter.com/MikolajBuchwald/status/1527780234254290946
- https://gist.github.com/FauxFaux/9686f285102bbaa59d63?permalink_comment_id=4174656#gistcomment-4174656
(do-release-upgrade's source code): https://git.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/tree/do-release-upgrade
References:
(How did I get there)
http://manpages.ubuntu.com/manpages/jammy/man8/do-release-upgrade.8.html => https://launchpad.net/ubuntu/jammy/+package/ubuntu-release-upgrader-core => https://launchpad.net/ubuntu/+source/ubuntu-release-upgrader/1:22.04.10
do-reloase-upgrade
source code
git clone https://git.launchpad.net/ubuntu/+source/ubuntu-release-upgrader
cat DistUpgrade/DistUpgradeController.py
394 self._view.error(_("Can not upgrade"),
395 _("An upgrade from '%s' to '%s' is not "
396 "supported with this tool." % (release, self.toDist)))
Questions:
- How it is called from the
ubuntu-release-upgrader/do-release-upgrade
(.py) (https://git.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/tree/do-release-upgrade) - What is the condition in the
DistUpgrade/DistUpgradeController.py
triggering the error.
TODO:
- Create UbuntuOne account
- Post a bug/question here: https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader . Similar bugs:
In order to reproduce the problem:
See https://gist.github.com/dergachev/f5da514802fcbbb441a1 and https://serverfault.com/questions/622735/how-do-i-upgrade-an-end-of-life-ubuntu-distribution/1101453#1101453
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get dist-upgrade
sudo do-release-upgrade
Expect an error:
Looking for a way to solve the issue (see also: https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1975533).
Here is the next step of the analysis:
=>
=>
Question: how to /tmp files end up being there? It looks like a zip/tarball has been downloaded (
sudo do-release-upgrade
).Answer:
self.script
creation: https://git.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/tree/DistUpgrade/DistUpgradeFetcherCore.py?h=applied%2Fubuntu%2Fgroovy#n118 -- At this step the tarball is being downloaded.Traceback
do-release-upgrade
: https://www.reddit.com/r/Python/comments/v79f6s/tracing_method_calls_in_a_python_script_in_an/ | Usage oftrace
: https://www.tutorialspoint.com/trace-or-track-python-statement-execution-traceNext task: find the URL of the tarball that is being downloaded (hint: print URI here: https://git.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/tree/DistUpgrade/DistUpgradeFetcherCore.py?h=applied%2Fubuntu%2Fgroovy#n196 ; and here: https://git.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/tree/DistUpgrade/DistUpgradeFetcherCore.py?h=applied%2Fubuntu%2Fgroovy#n203)