Package: debhelper
Version: 13.11.3
Severity: normal
Tags: patch
X-Debbugs-Cc: r...@debian.org

Hi,

First of all, thanks a lot for making Debian packaging a lot easier by
working on debhelper!

What do you think of the attached patch (also tracked in a Salsa merge request,
https://salsa.debian.org/debian/debhelper/-/merge_requests/101) that makes
the new `meson install` invocation pass the destdir as an argument to
`--destdir` instead of a positional parameter? I stumbled upon this when
I tried to use the new buildsystem functionality in the libmodulemd package:
putting 14 in debian/compat and changing the debhelper-compat B-D to
debhelper (>> 13.11~) made the build fail:

       dh_auto_install
            cd obj-x86_64-linux-gnu && LC_ALL=C.UTF-8 meson install 
/<<PKGBUILDDIR>>/debian/tmp
    usage: meson [-h]
                 
{setup,configure,dist,install,introspect,init,test,wrap,subprojects,rewrite,compile,devenv,env2mfile,help}
                 ...
    meson: error: unrecognized arguments: /<<PKGBUILDDIR>>/debian/tmp
    dh_auto_install: error: cd obj-x86_64-linux-gnu && LC_ALL=C.UTF-8 meson 
install /<<PKGBUILDDIR>>/debian/tmp returned exit code 2
    make: *** [debian/rules:8: binary] Error 25
    dpkg-buildpackage: error: debian/rules binary subprocess returned exit 
status 2

Thanks again for all your work on Debian!

G'luck,
Peter

-- System Information:
Debian Release: bookworm/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'stable-updates'), (500, 
'stable-security'), (500, 'oldstable-updates'), (500, 'oldoldstable'), (500, 
'stable'), (500, 'oldstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.0.0-6-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=bg_BG.UTF-8, LC_CTYPE=bg_BG.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 debhelper depends on:
ii  autotools-dev            20220109.1
ii  dh-autoreconf            20
ii  dh-strip-nondeterminism  1.13.0-2
ii  dpkg                     1.21.13
ii  dpkg-dev                 1.21.13
ii  dwz                      0.14+20220924-2
ii  file                     1:5.41-4
ii  libdebhelper-perl        13.11.3
ii  libdpkg-perl             1.21.13
ii  man-db                   2.11.1-1
ii  perl                     5.36.0-6
ii  po-debconf               1.0.21+nmu1

debhelper recommends no packages.

Versions of packages debhelper suggests:
pn  dh-make  <none>

-- no debconf information
From 70705d6429387f2142676b42d53dead01b547c09 Mon Sep 17 00:00:00 2001
From: Peter Pentchev <r...@debian.org>
Date: Mon, 26 Dec 2022 11:57:01 +0200
Subject: [PATCH] Pass --destdir to `meson install`

The `meson install` subcommand does not like a directory passed directly as
a positional argument.
---
 lib/Debian/Debhelper/Buildsystem/meson.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/Debian/Debhelper/Buildsystem/meson.pm 
b/lib/Debian/Debhelper/Buildsystem/meson.pm
index 9d11b2c6..d82512f3 100644
--- a/lib/Debian/Debhelper/Buildsystem/meson.pm
+++ b/lib/Debian/Debhelper/Buildsystem/meson.pm
@@ -136,6 +136,7 @@ sub test {
 
 sub install {
        my $this = shift;
+       my ($destdir) = @_;
        my $target = $this->get_targetbuildsystem;
 
        if (compat(13) or $target->NAME ne 'ninja') {
@@ -148,7 +149,7 @@ sub install {
                                'LC_ALL' => 'C.UTF-8',
                        }
                );
-               $this->doit_in_builddir(\%options, 'meson', 'install', @_);
+               $this->doit_in_builddir(\%options, 'meson', 'install', 
'--destdir', $destdir);
        }
        return 1;
 }
-- 
2.35.1

Attachment: signature.asc
Description: PGP signature

Reply via email to