Ubuntu encourage upgrading between releases by running a command,
instead of by manually editing sources and getting on with it.
This tool's name is do-release-upgrade
, and I believe it should just be doing:
sed -i 's/wily/xenial/g' /etc/apt/sources.list /etc/apt/sources.list.d/*
This command does not explain what it wants to do, or why it is doing anything. It has, in the past:
- Disabled repos I was using, and hence broken the software in them.
- Dropped the network on a remote machine which I was accessing over SSH.
- Hung unresumably due to network conditions.
This makes me unhappy. Let's see what it actually does:
% python3 -m trace --trace =do-release-upgrade 2>&1 | fgrep -A3 \"http:
MetaRelease.py(106): base_uri = "http://changelogs.ubuntu.com/"
MetaRelease.py(107): self.METARELEASE_URI = base_uri + "meta-release"
MetaRelease.py(108): self.METARELEASE_URI_LTS = base_uri + "meta-release-lts"
MetaRelease.py(109): self.METARELEASE_URI_UNSTABLE_POSTFIX = "-development"
First, it downloads some metadata over plain http. The metadata contains the URL to the random binary we're going to execute:
% curl -s http://changelogs.ubuntu.com/meta-release-lts-development | sed -n '1,/xenial/d; /UpgradeTool:/p'
UpgradeTool: http://archive.ubuntu.com/ubuntu/dists/xenial/main/dist-upgrader-all/current/xenial.tar.gz
This tar appears to have been built from:
https://bazaar.launchpad.net/~ubuntu-core-dev/ubuntu-release-upgrader/trunk/files
... which contains plenty of metadata, about what to do. For example,
- packages to remove upon upgrading.
- packages which have been demoted, which I guess means going from supported (main) -> community supported (universe / multiverse)?
I do not know how those packages would be removed otherwise, unless they were originally marked as "automatically installed", and are now obsolete? This seems unlikely to have happened.
So, maybe the tool has non-zero value. I think I'd rather just have the list of packages, though, thanks...
A very interesting observation, indeed. I recently had problems with
do-release-upgrade
upgrade for EOL Ubuntu 20.10. The official documentation says to manually change sources lists and download and run the specificUpgradeTool
. I wonder if we could improve the waydo-release-upgrade
.The value I see is the abstraction for the user. However, I agree that this tool can be improved.
Interestingly, the discussion on what
do-release-upgrade
actually do goes back as long as 8 years back: https://askubuntu.com/questions/409555/what-does-do-release-upgrade-really-do