--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: [5.6.12 Version] Wrong version ordering with "+XXXX" suffixes
- From: Ole Streicher <olebole@debian.org>
- Date: Fri, 7 Oct 2016 13:50:38 +0200
- Message-id: <5e6d2148-80e8-5a96-a139-20c5f28b7b9a@debian.org>
Package: packaging-manual
When a package uses a changed tarball (by removing some files from the
original one), this is usually indicated by adding a "+dfsg" or
"+repack" to the upstream version number.
This, however, may lead to a wrong version ordering of version numbers,
as seen in the "saods9" package:
The old package version is 7.5rc by upstream, which translates to
7.5~rc+repack for the (squeezed) debian orig tarball.
After that, upstream released a 7.5rc2, which would translate to
7.5~rc2+repack using the same rules.
However, they have the wrong order:
$ dpkg --compare-versions 7.5~rc+repack lt 7.5~rc2+repack && \
echo lt || echo ge
ge
dbkg is not to blame here, since this order is determined by the Debian
Policy, § 5.6.12.
IMO the policy should be changed here to handle the "+" differently
according to its common use: analogous to the "~" it should be sorted
before everything else, but /after/ the end of a part.
Best regards
Ole
--- End Message ---
--- Begin Message ---
- To: Ole Streicher <olebole@debian.org>
- Cc: 840002-done@bugs.debian.org
- Subject: Re: Bug#840002: [5.6.12 Version] Wrong version ordering with "+XXXX" suffixes
- From: Russ Allbery <rra@debian.org>
- Date: Sat, 31 Dec 2016 22:52:23 -0800
- Message-id: <87d1g746hk.fsf@hope.eyrie.org>
- In-reply-to: <5e6d2148-80e8-5a96-a139-20c5f28b7b9a@debian.org> (Ole Streicher's message of "Fri, 7 Oct 2016 13:50:38 +0200")
- References: <5e6d2148-80e8-5a96-a139-20c5f28b7b9a@debian.org>
Control: tags -1 wontfix
Ole Streicher <olebole@debian.org> writes:
> When a package uses a changed tarball (by removing some files from the
> original one), this is usually indicated by adding a "+dfsg" or
> "+repack" to the upstream version number.
> This, however, may lead to a wrong version ordering of version numbers,
> as seen in the "saods9" package:
> The old package version is 7.5rc by upstream, which translates to
> 7.5~rc+repack for the (squeezed) debian orig tarball.
> After that, upstream released a 7.5rc2, which would translate to
> 7.5~rc2+repack using the same rules.
Yes, 7.5rc is an unfortunate version number from a Debian perspecive if
you're adding suffixes to it. It's hard to realize until you run into
this, but in Debian you probably want to package this as 7.5rc0 for
reasons like this.
> However, they have the wrong order:
> $ dpkg --compare-versions 7.5~rc+repack lt 7.5~rc2+repack && \
> echo lt || echo ge
> ge
> dbkg is not to blame here, since this order is determined by the Debian
> Policy, § 5.6.12.
> IMO the policy should be changed here to handle the "+" differently
> according to its common use: analogous to the "~" it should be sorted
> before everything else, but /after/ the end of a part.
I agree that this is unfortunate and confusing in this specific case. But
I'm afraid there's just no way that we can change the sort order at this
point. This is foundational everything that manipulates packages in
Debian, and years of package uploads have been done on the basis of the
current sort order. It would be hugely disruptive to redefine it now.
The only change we've made is to assign meaning to a character that was
previously prohibited. Any future change would have to be similarly
backward-compatible.
This is the sort of standard that, once set, you're pretty much stuck
with, for good or for ill.
--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>
--- End Message ---