Bug#458910: debian-policy: Policy and dpkg disagree on debian revision tests.
Raphael Hertzog <hertzog@debian.org> writes:
> I confirm that the implementation in dpkg is done in such a way that the
> lack of revision is the same than a revision set to "0". Exactly like
> the lack of epoch is equal to an epoch of 0.
>
> Maybe we should say "the absence of a debian_revision compares earlier
> than the presence of a non-empty non-null one".
Here is a proposed patch that also clarifies the comparison of version
numbers a bit. Seconds?
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 <var>upstream_version</var> and
<var>debian_revision</var>. The absence of a
- <var>debian_revision</var> compares earlier than the
- presence of one (but note that the
- <var>debian_revision</var> is the least significant part
- of the version number).
+ <var>debian_revision</var> is equivalent to a
+ <var>debian_revision</var> of <tt>0</tt>.
</p>
</item>
</taglist>
</p>
<p>
- The <var>upstream_version</var> and <var>debian_revision</var>
+ When comparing two version numbers, first the <var>epoch</var>
+ of each are compared, then the <var>upstream_version</var> if
+ <var>epoch</var> is equal, and then <var>debian_revision</var>
+ if <var>upstream_version</var> is also equal.
+ <var>epoch</var> is compared numerically. The
+ <var>upstream_version</var> and <var>debian_revision</var>
parts are compared by the package management system using the
- same algorithm:
+ following algorithm:
</p>
<p>
--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>
Reply to: