Hi,

On Fri, 2025-12-19 at 00:17:18 +0000, Ian Jackson wrote:
> Package: libdpkg-perl
> Version: 1.23.2
> Control: block 1123583 by -1

> As I understand it, a Dpkg::Version object represents a Debian version
> number.  I don't think the concept of native, vs non-native, *version
> numbers*, is affected at all by the TC decision in #1007717.  It no
> longer corresponds identically to the source package format, but
> Dpkg::Version doesn't involve anything to do with source package
> formats.

I still think this is a conceptual marsh now, so using that term now
in the version context is a further recipe for confusion.

The problem is that I think most if not all current users of this
method are in the context of deciding how to handle source packages
based on the version number, which given the introduction of this
confusion was (partially) reasoned as both of those not being
necessarily related, well seems even more wrong, but meh.

> It's a shame that policy has not yet been updated (#1107137) but I
> think it's clear that we are going to retain the terminology "native
> version number".

I think at this point that would be a poor decision. At least
deb-version(7) has never used that terminology, and I'll probably at
some point check whether there are any other uses of it in the dpkg
documentation (besides the one describing the current unfortunate
situation) and reword them.

> In practical terms for callers: authors using this API have presumably
> been calling this method, and other methods in Dpkg/Version.pm, in
> order to avoid reimplementing Debian's version numbering algoriths,
> and be spared the need to adapt their code if Debian's package
> versioning scheme changes.
> 
> So I think people using this function are doing the right thing, and
> rewarding them by deprecating it can't be right.  No doubt many will
> conclude that they should have just looked for a hyphen in the string.
> Especially since the version of dpkg in sid doesn't seem to offer any
> alternative.  Do you really intend for users of this method to
> write !~ m/-/ instead ?

Because I expect this to continue to be contentious, and I don't have
the energy for it (besides writing this reply), I've added new methods
with better and more neutral names to introspect on the properties of
the version, called has_epoch() and has_revision(). Users can then
use/misuse them to handle source packages if they wish to…

Changes will be in my next push to be included in dpkg 1.23.3.

Regards,
Guillem

Reply via email to