Bug#1057776: dh-make-perl: Incorrect .deb filename is used when --install and --revision are supplied

Dan Lewis dan.lewis at sitpub.com
Fri Dec 8 11:16:12 GMT 2023


Package: dh-make-perl
Version: 0.122
Severity: normal
Tags: patch
X-Debbugs-Cc: dan.lewis at sitpub.com

Dear Maintainer,

When both the --install and --revision options are used with
dh-make-perl, the package build is successful but the package
installation fails due to the supplied revision not being included in
the filename passed to dpkg.

e.g., if the following is run:

    dh-make-perl --install --revision 100 --cpan JSON::Diffable

dh-make-perl correctly builds the .deb file with the supplied revision
and creates libjson-diffable-perl_0.000002-100_all.deb

However, it then supplies 'libjson-diffable-perl_0.000002-1_all.deb' to
dpkg when attempting to install the package. Note the use of a hardcoded
'-1' revision. This causes the operation to fail with:

dpkg-deb: building package 'libjson-diffable-perl' in '../libjson-diffable-perl_0.000002-100_all.deb'.
make: Leaving directory '/root/JSON-Diffable-0.000002'
I: Running 'apt install /root/JSON-Diffable-0.000002/../libjson-diffable-perl_0.000002-1_all.deb'...
Reading package lists... Done
E: Unsupported file /root/JSON-Diffable-0.000002/../libjson-diffable-perl_0.000002-1_all.deb given on commandline
Cannot install package /root/JSON-Diffable-0.000002/../libjson-diffable-perl_0.000002-1_all.deb

The filename is generated with:

$debname = sprintf( "%s_%s-1_%s.deb", $self->pkgname, $self->version,
$archspec );

Which I believe should instead be:

$debname = sprintf( "%s_%s_%s.deb", $self->pkgname, $self->pkgversion,
$archspec );

$self->pkgversion contains the revision supplied with --revision.

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

Kernel: Linux 6.6.2-arch1-1 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect

Versions of packages dh-make-perl depends on:
ii  debhelper                  13.11.4
ii  dpkg-dev                   1.21.22
ii  fakeroot                   1.31-1.2
ii  libapt-pkg-perl            0.1.40+b2
ii  libarray-unique-perl       0.08-4
ii  libclass-accessor-perl     0.51-2
ii  libconfig-ini-perl         1:0.029-1
ii  libconfig-model-dpkg-perl  2.165
ii  libdebian-source-perl      0.122
ii  libdpkg-perl               1.21.22
ii  libemail-address-xs-perl   1.05-1+b1
ii  libemail-date-format-perl  1.008-1
ii  libfile-which-perl         1.27-2
ii  liblist-moreutils-perl     0.430-2
ii  libmodule-depends-perl     0.16-5
ii  libpod-parser-perl         1.65-1
ii  libsoftware-license-perl   0.104002-1
ii  libtie-ixhash-perl         1.23-4
ii  libwww-mechanize-perl      2.16-1
ii  libwww-perl                6.68-1
ii  libyaml-libyaml-perl       0.86+ds-1
ii  libyaml-perl               1.30-2
ii  make                       4.3-4.1
ii  perl                       5.36.0-7

Versions of packages dh-make-perl recommends:
ii  apt-file              3.3
ii  git                   1:2.39.2-1.1
ii  libmodule-build-perl  0.423200-1
ii  libsys-cpu-perl       0.61-3+b1
ii  pristine-tar          1.50

dh-make-perl suggests no packages.

-- no debconf information
-------------- next part --------------
--- /lib/DhMakePerl/Command/make.pm	2023-02-21 20:14:06.000000000 +0000
+++ /lib/DhMakePerl/Command/make.pm	2023-12-01 17:12:50.901091797 +0000
@@ -465,7 +465,7 @@
         $archspec = $arch;
     }

-    $debname = sprintf( "%s_%s-1_%s.deb", $self->pkgname, $self->version,
+    $debname = sprintf( "%s_%s_%s.deb", $self->pkgname, $self->pkgversion,
         $archspec );

     my $deb = $self->main_dir . "/../$debname";


More information about the pkg-perl-maintainers mailing list