AutomaticUpgrade

Revision 8 as of 2005-10-31 21:18:05

Clear message

Summary

This is a proposal for an application capable of easing the transition from one version of Ubuntu to the next.

Rationale

At the moment people who want to upgrade from one version of Ubuntu to the new release have to update their sources.list manually, and then do a dist-upgrade. For most people not experienced with Ubuntu, using the command-line is a big step (see CommandLineDisintegration), especially where it concerns something as important as an upgrade. Aside from this, many people may not know that a new version of Ubuntu is available.

The Starter Guide in Ubuntu 5.10 contains instructions on how to upgrade ... to Ubuntu 5.10. Instructions on how to upgrade to Ubuntu 6.04ish could not be included because they depended on knowing the codename for that release, and the codename was not announced in time.

One of the difficulties of actually doing an upgrade is being confronted with unexpected questions about how to deal with config files during the upgrade itself. These come at a bad time, since the user can't use the machine that is being upgraded to search the web for help. So it would also help if the system could simulate a "dry run" of the upgrade or look for changed configuration packages or somehow provide upgrade information tailored to the set of packages currently installed.

Use cases

Scope

Design

My proposed solution is to make a small application that will depend on the desktop metapackages (ubuntu-desktop, kubuntu-desktop, xubuntu-desktop), and will have a menu entry in System->Administration (and its KDE/XFCE equivalents).BR This application would only become part of the ubuntu-desktop package once the next release has been released, at which time it would be automatically uploaded to everybody who hasn't removed the ubuntu-desktop meta-package.BR After this had happened, there could be a notification similar to what now happens after you upgrade the kernel, only stating that there is a new version and that the user might want to look at the Automatic Upgrade application.BR The application itself would only contain several buttons:BR

  • [Upgrade to Breezy] - would change the sources.list, and do a dist-upgrade.
  • [Show me the release notes] - would open the release notes in the user's browser. Preferably a local copy that came with the application and also contains links to where the CDs can be downloaded.
  • [Where can I download the CD?] - would open up the page with the CDs that can be downloaded for those without the necessary connection, but able to download them elsewhere. This might be overkill as the links are already present in the release notes as well.
  • [Send me the CD] - would open up the [https://shipit.ubuntu.com/ ShipIt page], or a simple form that already takes the information from About Me.

  • [Cancel] - for those who don't want to upgrade now.
  • [Remind me one month from now] - a checkbox for periodic reminders.

Pros

  • This solution would let users know that a new version is available, and offer them an easy way to upgrade to this version.
  • Users who do not want to update only have an unobtrusive entry in their Administration menu, and could in theory remove that. Although doing that through synaptic would break the ubuntu-desktop meta-package.

Cons

  • This solution only works for users who still have the (x|k)ubuntu-desktop metapackage installed. On the other hand, the users who no longer have that are most likely the ones who know how and when to do an upgrade anyway.
  • There would be a high clutter factor for in having an entire Administration menu item for something that, on average, is going to be used less than once in six months (since some people will upgrade using a CD or not at all).

Actual Upgrade

The actual upgrade should be done in a more flexible way then to just do a dist-upgrade. There should be support for addtional steps that needs to be taken in order to guarantee a upgrade. That includes things like installing/upgrading packages before the actual dist-upgrade, modify sources.list (with a /etc/apt/sources.list.d/ entry) or run random scripts.

This script file should be put into a tarball on a ubuntu server (gpg signed). The update tool downloads the tarball, unpacks it, runs the script and make use of possible additonal stuff inside the tarball. Any actions that are taken need to communicate with a frontend that displays a nice and user-friendly screen.

Because a upgrade always involves removing packages there must be some sanity checks to ensure that nothing is removed that shouldn't be. Checking if e.g. no Kernel, X, or meta-packages are removed needs to be checked. For meta-packages a additional flag (MetaPackage) should be used in the Packages file. Additionaly it should be possible to have a whitelist in the upgrade-package that knows about save removals.

Implementation

Code

Data preservation and migration

Outstanding issues

BoF agenda and discussion