Skip to content.
The Debian System -- Concepts and Techniques The Debian System -- Concepts and Techniques
Martin F. Krafft Open Source Press / No Starch Press ISBN 3-937514-07-4 / 1-593270-69-0
Sections
Personal tools

Bad versioning scheme for pre-release versions (page 218)

Document Actions
More...

Reported on: 2006-02-01

In chapter 5. The Debian package management system on page 218:

The versioning scheme for pre-release upstream  versions proposed in section 5.7.5 is not desirable: encoding the pre-release version in the Debian revision prevents a new orig.tar.gz file from being uploaded when the final release is uploaded.

The following rewrite should make the situation clear. It replaces the second half of the middle paragraphon page 218, starting at "Within the Debian archive, it is customary...":

One scheme could be to release 1.0-rc1 as 1.0-0+1.0rc1+1, followed by 1.0-0+1.0rc1+2, and then 1.0-1 when the final gets released. However, this approach has an inherent problem: for each upstream version, an orig.tar.gz file exists in the Debian archive; Debian revisions are released as diff.gz files against the orig.tar.gz file (see chapter 9.2.12). In the proposed scheme, the orig.tar.gz file will contain the 1.0-rc1 upstream release, and when the final 1.0 release is to be packaged, the diff.gz file for the 1.0-1 Debian release will have to encompass all upstream changes between 1.0-rc1 and 1.0 as well, which is undesirable.

Thus, a better approach is to encode the pre-release version as part of the upstream vesion. This can be done in one of two ways: using the previous upstream version as base (let's assume 0.90), or an obviously fake upstream version that sorts before the final release: 0.90+1.0rc1-1 or 0.999+1.0rc1-1. Now, upon release of 1.0, a new orig.tar.gz file can be uploaded to replace the previous one. With that in mind, it should be easy to infer the upstream version number from the Debian version, even in complex cases.

Credits

Gerfried Fuchs
Feedback

Richard Bejtlich, Tao Security: I was extremely impressed by Martin Krafft's The Debian System.

 
 

Powered by Plone

This site conforms to the following standards: