how dose apt-get compares between two different version schemes of the same package?
for example: 1.3.8 ? 1.09
More detailed example:
Lets say i got
package_a in my repository with version 1.08 (
Then i upload a new version of the same package but I've changed then version scheme,
and its now 1.2.0 (
When i'll run
apt-get install package_a what version will be installed and why?
Best How To :
The algorithm used by Debian tools to compare package versions is described in the Debian Policy Manual:
In short: within the upstream version of the package version (which is what you're describing here), each numeric "segment" of the version number is compared separately, and the first pair that differs is used for the comparison.
Given your example of comparing
1.2.0, the segments end up being
1, 8 and
1, 2, 0. Because 8 is greater than 2, 1.08 would be treated as the newer version.
If your versioning scheme changes dramatically, use an epoch number to indicate the break. For instance, if
1.2.0 is part of a new version numbering scheme, use
1:1.2.0 as the Version field, and include that
1: in all future versions.