Why does `do-release-upgrade` skip a version?
I answered this question about do-release-upgrade
not allowing an upgrade of 14.10 to 15.04 only to 15.10, I assumed it was due to 15.04 being end of life.
A user (@xangua ) posted that it was not possible to skip a release with do-release-upgrade
, so I looked in to this information by running the command on my 14.04 box, but this is where the confusion began.
My 14.04 wants to upgrade straight to 15.04?
Of course this invalidates my answer as 15.04 is end of life, but why does this command seem to be skipping versions, if not based on end of life?
There is no indication any thing from 14.10 is being downloaded by the upgrade and software-updater
says Ubuntu 15.04 is now available for download, some clarification of this would be great.
Your original guess was right. 15.04 is supported through 2016-02-04, so do-release-upgrade
is trying to upgrade you to the next supported release compared to the one you have.
Here's the description of normal upgrade prompting mode from /etc/update-manager/release-upgrades
:
Check to see if a new release is available. If more than one new release is found, the release upgrader will attempt to upgrade to the release that immediately succeeds the currently-running release.
So if I'm on 14.04 it should be trying to take me to 14.10, but right now do-release-upgrade
is trying to take the OP (and me) to 15.04 instead.
So reading through /usr/lib/python3/dist-packages/DistUpgrade/MetaRelease.py
it looks like we skip unsupported releases when figuring out what release to upgrade to (unless you're using the developer flag):
# then see what we can upgrade to
upgradable_to = ""
for dist in dists:
if dist.date > current_dist.date:
# Only offer to upgrade to an unsupported release if running
# with useDevelopmentRelease, this way one can upgrade from an
# LTS release to the next supported non-LTS release e.g. from
# 14.04 to 15.04.
if not dist.supported and not self.useDevelopmentRelease:
continue
upgradable_to = dist
self._debug("new dist: %s" % upgradable_to)
break
I should add that I do not recommend trying to get around this with do-release-upgrade -d
. When I tried it with prompt=normal
, I got 404s, since 14.10 is EoL. I also think in my delirium I must have tried do-release-upgrade -p
, which tried to take me straight to 16.04. By the time I realized it was taking me to xenial everything was broken and I had to restore from factory. In the end I decided I'll wait until 16.04 is released and do a fresh install.
do-release-upgrade doesn't know anything about "jumping versions". It simply downloads the upgrade plan from the Ubuntu repository maintainers. This is specified in do-release-upgrade README:
2) The upgrade tool must be able to download updated information how to perform the upgrade (e.g. additional steps like upgrading certain libs first)
Also, in the specification about Automatic Upgrades:
A meta-release file with information about the available distributions is stored on a central server and it is If-Modified-Since tested on each run of update-manager. If a new version is found, update-manager shows that visually.
This is what allows do-upgrade-release and any other tool to upgrade seamlessly.