Package: libdpkg-perl
Version: 1.22.22
Severity: normal

Dear Maintainer,

* What led up to the situation?
  - In "trixie" trying to use "Dpkg::Version::version_compare" fails
  - The error was very clear:
    "Use of uninitialized value $a in string at /usr/share/perl5/Dpkg/Version.pm
line 271, <> line 266."

* The root cause is in commit (appeared before version 1.22.12):
  "a9b22de4db4d42417c4cac74e7e537f48284e731 perl: Remove function prototypes"

* Removing prototype of a sort function affects its semantics.
  From "sort" documentation in perlfunc man page:
      "If the subroutine's prototype is "($$)", the elements to be compared
       are passed by reference in @_, as for a normal subroutine."

* But the existing code still expect parameters in @_
  (which is empty after prototype removal)

* Minimal fix: re-add the missing prototype to that function

* Alternative fix: use $a and $b directly and don't assign them from @_

* My temporary workaround: wrote a small wrapper that pass $a and $b as explicit
parameters

-- System Information:
Debian Release: 13.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.48+deb13-amd64 (SMP w/48 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libdpkg-perl depends on:
ii  dpkg  1.22.22
ii  perl  5.40.1-6

Versions of packages libdpkg-perl recommends:
ii  bzip2                   1.0.8-6
ii  libfile-fcntllock-perl  0.22-4+b4
ii  liblocale-gettext-perl  1.07-7+b1
ii  xz-utils                5.8.1-1

Versions of packages libdpkg-perl suggests:
ii  binutils                   2.44-3
pn  bzr                        <none>
ii  debian-keyring             2025.07.26
ii  debian-tag2upload-keyring  1.1
ii  gcc [c-compiler]           4:14.2.0-1
ii  gcc-14 [c-compiler]        14.2.0-19
ii  git                        1:2.47.3-0+deb13u1
ii  gnupg                      2.4.7-21+deb13u1
ii  gpgv                       2.4.7-21+deb13u1+b2
ii  patch                      2.8-2
ii  sensible-utils             0.0.25
ii  sqv                        1.3.0-3+b2

-- no debconf information

--
Oron Peled

Reply via email to