debian mentors/ commonpackagingmistakes/ Version Numbers

Version Numbers

There are some mistakes that people make with version numbers in a package.

Jumping versions

If an upload is made to the archive with a -1 DebianVersion then the next upload should under normal circumstances use a -2 version number. If a higher version is used it at least requires the package to be built in a slightly different way, and is also confusing.

It can happen that a package has multiple uploads to experimental, the last version of which is then uploaded to unstable. This means that the version number will jusp in unstable, but here it is the correct thing to do.

If you do have package that has multiple revisions inbetween uploads then when building you need to tell dpkg-dev to include all the changelog versions. This is done using the -v option to dpkg-buildpackage. Give it the last version in unstable, and it will include all the changelog entries after that version, e.g building version 1.2-5, when 1.2-3 is the last version in the archive,

 dpkg-buildpackage -v1.2-3

includes the changelog entries i for both version 1.2-4 and 1.2-5, so that automated bug closure works correctly.

This is especially important if one of the missing revisions is a new upstream version (e.g. the last version in the archive is 1.2-3 and the new version is 1.3-2), as without the -v switch here dpkg-dev would not include the .orig.tar.gz in the upload, meaning that the upload would be rejected. This also applies to intial releases: some people like to implement suggestions by sponsors by incrememting the revision, so that if the package is not built with the -v option the .orig.tar.gz will not be included and the bugs will not be fixed (although the upload would be rejected anyway).