From 2d210c6df32ea5126179da2be4c1e3b5b4d713a5 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Sun, 27 Apr 2008 19:00:41 -0700 Subject: [PATCH] Better document version ranking and 0 Document that an empty Debian revision is equivalent to a Debian revision of 0 and clarify the way version numbers are compared. Thanks to Raphael Hertzog for information about what dpkg does. --- policy.sgml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/policy.sgml b/policy.sgml index 1c9a339..b7ac92e 100644 --- a/policy.sgml +++ b/policy.sgml @@ -2877,19 +2877,22 @@ Package: libc6 number apart at the last hyphen in the string (if there is one) to determine the upstream_version and debian_revision. The absence of a - debian_revision compares earlier than the - presence of one (but note that the - debian_revision is the least significant part - of the version number). + debian_revision is equivalent to a + debian_revision of 0.

- The upstream_version and debian_revision + When comparing two version numbers, first the epoch + of each are compared, then the upstream_version if + epoch is equal, and then debian_revision + if upstream_version is also equal. + epoch is compared numerically. The + upstream_version and debian_revision parts are compared by the package management system using the - same algorithm: + following algorithm:

-- 2.39.5