14

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.

4
  • 2
    It is not normal that your 14.04 system wants to upgrade to 15.04, as this is not supported. For example, the release notes for 15.04 only mention upgrading from 14.10. When I run do-release-upgrade on my 14.04 system, it says "no new release found", as is normal since a 14.04 system could only ever be upgraded to 14.10, but 14.10 is now EOL.
    – fkraiem
    Jan 26, 2016 at 5:45
  • 1
    So there must be something abnormal on your system. What is your version of ubuntu-release-upgrader-core?
    – fkraiem
    Jan 26, 2016 at 5:48
  • 1
    I can no longer provide this information, that install is gone due to messing with the command, reinstall was easier than correcting the errors caused by stoping the upgrade.
    – Mark Kirby
    Jan 26, 2016 at 14:48
  • 1
    @fkraiem actually, skipping versions is supported since repository managers can "script" their way.
    – Braiam
    Feb 12, 2016 at 2:18

2 Answers 2

12
+200

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.

4
  • 1
    Do you have anything to back that up, or did you just guess?
    – Ken Sharp
    Jan 26, 2016 at 5:37
  • 1
    Added details. I was running into the same issue as OP.
    – mmaluff
    Jan 26, 2016 at 6:11
  • 3
    Solid answer to a question I thought would just fall in to obscurity :)
    – Mark Kirby
    Jan 26, 2016 at 14:47
  • 3
    The behavior described in this excellent answer still applies, and it applies to upgrades via the Software Updater as well as do-release-upgrade. Currently, 16.04 LTS systems automatically offer to upgrade to 17.04, and they'll do so directly, skipping 16.10 because it is end-of-life. Those answers would benefit from this correction--or a new answer fully describing the current behavior could be posted. Do you want to post something? Nov 30, 2017 at 13:43
5

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .