Build And Branch Versions
Status
Created: 2005-07-17 by ScottJamesRemnant
Status: DevelopmentProposal
Bugs: 62529
Details
The question is the format of version that dpkg will recognise as a binary-only NMU, an upload that changes the binary version of the package but not the source version.
The reason we want this is so dpkg can obtain the original source version from the binary version and arrange matters such that both ${Source-Version} and the Source: header reflect this.
Using wibble in the following example as the binary-only NMU identifier, we want to achieve:
Source: foo (1.2-3) Binary: foo Version: 1.2-3wibble Depends: foo-common (= 1.2-3)
This solves:
- archive and testing migration scripts identifying binary-only NMUs; they simply need look at the Source header, rather than attempting their own heuristics.
packages depending on a binary-all package; such as multiarch libfoo-common-dev packages. The ${Source-Version} variable would contain the original source version being recompiled, the dependencies would match.
This does not solve:
packages depending on a binary-arch package. The ${Source-Version} variable would contain the wrong information, and the ${Version} variable would have to used instead. This would be error-prone and is also currently in violation of policy.
The choice of format is important for its sorting properties:
a) it must sort higher than the previous version of the package;
1.2-3 << 1.2-3wibble
b) it must sort lower than the next version of the package, including minor/NMU revisions;
1.2-3wibble << 1.2-4 1.2-3wibble << 1.2-3.1
c) it must sort lower than security and cdd uploads, though we have the freedom to suggest a change of format for these;
1.2-3wibble << 1.2-3woody1 1.2-3wibble << 1.2-3ubuntu1
The formats suggested so far:
1.2-3.0.1 (bin-NMU of source), 1.2-3.2.1 (bin-NMU of NMU).
- Current style; this clashes with many valid version numbers, especially when used for native packages. It does not pass (c).
1.2-3b1
- "Build #n" style; slight potential clash with valid version numbers, but not a major one. Passes (c) if the string matches [^ab].
1.2-3+b1
- "Plus build #n" style; this clearly identifies the fact that it's a bin-NMU in all situations. It does not pass (c), however we can alter the security and cdd upload format to +sec-woody1 (or any other string matching +[^ab]).
1.2-3^1
- "Build epoch" style; this would require changes to dpkg and APT's versioning scheme, requiring a skipped-release use delay. ^ or @ would sort less than everything when used in most comparisons, including letters, so passes all 3. When used to compare a dependency version, the build-epoch would be ignored.