upgrade-oldest home

Overwiew

upgrade-oldest(8) selectively upgrades a Debian system by upgrading the packages with the oldest and most significant version numbers. It can be limited to certain sections, and the level of version differece necessary to trigger an upgrade can be controlled.

It is a simple Python script, but it is very powerful.

License: GPL

Copyright: (c) 2005 Alexander 'zowers' Petrov <zowers@gmail.com>

Comparison

Suppose you have a slow internet connection and would like to upgrade your old Debian system. You have 3 opportunities:

  1. use apt-get upgrade to upgrade all your packages;
  2. use apt-get install packages1 package2 ... packageN;
  3. use upgrade-oldest to upgrade only packages, which version numbers changed most.

Technical background

Debian Policy Manual, Chapter 3 - Binary packages describes Debian package management system and version numbering of binary packages. The version number of a package has the following format: [epoch:]upstream_version[-debian_revision].

epoch
This is a single (generally small) unsigned integer. It may be omitted, in which case zero is assumed. If it is omitted then the upstream_version may not contain any colons.
upstream_version
This is the main part of the version number. It is usually the version number of the original ("upstream") package from which the .deb file has been made, if this is applicable. Usually this will be in the same format as that specified by the upstream author(s); however, it may need to be reformatted to fit into the package management system's format and comparison scheme.
debian_revision
This part of the version number specifies the version of the Debian package based on the upstream version. It may contain only alphanumerics and the characters + and . (plus and full stop) and is compared in the same way as the upstream_version is. It is optional.

upgrade-oldest compares version number of currently installed package with version number of package available for download splitting whole version number into parts, which are compared to each other. Each part of version number has its level: epoch is level 0, major upstream_version is level 1, next to major is level 2 and so on. Package is upgraded when current version part is lower than corresponding part of available version. You can set maximum level to which such comparison applies with -u option, by default it is 2.

Examples

upgrade-oldest.py -u 1 -i x11,admin
Upgrade packages in x11 and admin sections using apt-get(8), which have old epoch and major version.
upgrade-oldest.py -u 0 -a wajig
Upgrade packages  using wajig(1), which have old epoch.
upgrade-oldest.py -a list
List old packages.

Downloading

For now (03.Feb.2005) upgrade-oldest must be downloaded from sourceforge.net.

Binary Debian package is upgrade-oldest_x.x.x_all.deb

Download page: http://sourceforge.net/project/showfiles.php?group_id=129295

Requirements

Python interpreter and apt_pkg Python module: apt-get install python-apt

Installation

dpkg -i upgrade-oldest_x.x.x_all.deb

Links

Debian GNU/Linux: http://debian.org

Python language: http://python.org

apt_pkg module: http://packages.debian.org/python-apt

upgrade-oldest(8) manual page: upgrade-oldest.8

Freshmeat.net upgrade-oldest project info: http://freshmeat.net/projects/upgrade-oldest/

Sourceforge.net upgrade-oldest project page: http://sourceforge.net/projects/upgrade-oldest/

SourceForge.net

Copyright: Alexander 'zowers' Petrov, 03.Feb.2005