This site is now 100% read-only, and retired.

Upgrading unstable machines safely

Posted by Steve on Wed 17 Nov 2004 at 14:48

When running Debian's Unstable distribution most users tend to upgrade daily, or weekly. Sometimes things break and can take a day or two to be fixed, if this happens at an inconvient time you're in trouble. Here we describe two tools to help prevent this.

The apt system has hooks built in which allow you to run commands before and after a package upgrade.

These hooks aren't widely used, but two tools certainly make use of them: apt-listchanges shows you the the package changelogs before upgrading, and apt-listbugs show bugs currently reported against packages about to be installed.

The second package is the most often neglected, essentially it queries the Debian Bug Tracking System for reports listed against the packages you are going to install.

This allows you to see important, or grave bugs which might have been reported by people who upgraded before you. If you see a bug which looks serious you can read the discussion and then decide whether you wish to proceed with the upgrade.

For example the following is output I saw this morning when running apt-get upgrade:
Reading package fields... Done
Reading package status... Done
Retrieving bug reports... Done     
grave bugs of nvidia-kernel-source (1.0.6629-1 -> 1.0.6629+1-1) 
#267359 - nvidia-kernel-source: X Windows hard locks (requires hard restart)
#267799 - fails to auto-load kernel module
nvidia-kernel-source(2 bugs)
Are you sure you want to install/upgrade the above packages? [Y/n/?/...]

Examining the discussion in the two bugs I decided to upgrade anyway. apt-listchanges is a similar idea to apt-listbugs, it shows you information relating to the packages you're about to upgrade, in this case it shows you the changelog of the Debian package.

All Debian packages install a 'changelog' file beneath /usr/share/doc/$packageName, usually called changelog.Debian (compressed it would be changelog.Debian.gz.

(To read a compressed file you can either enable to filters and use less, or run "zcat changelog.Debian.gz | more".)

The Debian changelog can contain useful information such as the number of bugs fixed since the last revision of the package, or notes on new releases.

Both of these packages can prevent you from being suprised by sudden breakages, and upgrade safely.