Your message dated Sun, 6 Sep 2026 17:52:01 +0200
with message-id <[email protected]>
and subject line Re: Bug#1146868: dpkg --compare-versions result somehow 
unexpected
has caused the Debian Bug report #1146868,
regarding dpkg --compare-versions result somehow unexpected
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1146868: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1146868
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: src:dpkg
Version: 1.23.7

This is a version construction, where the prefix before the plus sign is taken from the version of a binary package, and the suffix is derived from another source package (i.e. a source package building using the source packaged as a binary).

$ dpkg --compare-versions 2.47-2+1 lt 2.47-2ubuntu1+1; echo $?
1

Apparently, the -2 and -2ubuntu1 should be parsed as belonging to the prefix. Is this a known thing, and working as designed, or is this something that should/could be fixed?
--- End Message ---
--- Begin Message ---
tag 1146868 wontfix
thanks

Hi!

On Sun, 2026-09-06 at 16:04:19 +0200, Matthias Klose wrote:
> Package: src:dpkg
> Version: 1.23.7
> 
> This is a version construction, where the prefix before the plus
> sign is taken from the version of a binary package, and the suffix
> is derived from another source package (i.e. a source package
> building using the source packaged as a binary).
> 
> $ dpkg --compare-versions 2.47-2+1 lt 2.47-2ubuntu1+1; echo $?
> 1
> 
> Apparently, the -2 and -2ubuntu1 should be parsed as belonging to
> the prefix.  Is this a known thing, and working as designed, or is
> this something that should/could be fixed?

This is how the algorithm has worked for a very very long time (as
documented in deb-version(7) and Debian Policy), I don't see anything
to fix here. Also even if we wanted, that would break so much stuff,
and would need coordination with so many implementations, that I don't
think it would be feasible anyway). Thus closing.

Thanks,
Guillem

--- End Message ---

Reply via email to