#1142577 debhelper: meson install should use --no-rebuild

#1142577#5
Date:
2026-07-22 08:41:20 UTC
From:
To:
blhc is a default job for Salsa CI. Several meson apps fail the blhc
job in Salsa CI.

This can be worked around for a package using debhelper compat 14 with

override_dh_auto_install:
    dh_auto_install -- --no-rebuild

meson install --no-rebuild is documented briefly at
https://mesonbuild.com/Commands.html#install

It looks like the blhc failure is simply because the build steps done
by meson install are not verbose enough for blhc's analysis of the
build logs.

See https://salsa.debian.org/gnome-team/extras/quadrapassel/-/jobs/9791972
with this build log excerpt

3239:NONVERBOSE BUILD: [3/10] Compiling C object
src/quadrapassel.p/meson-generated_.._resources.c.o

I don't know why meson install insists on rebuilding some things
during the install step. Nevertheless, for Debian's purposes, I
believe we can rely on things being built during meson's build step
and avoid an unnecessary rebuild (for our purposes) during meson
install.

Therefore, please have the default behavior for debhelper's meson
install use --no-rebuild. This should only be done for compat level 14
and higher. debhelper compat 13 uses "ninja install" instead of "meson
install" by default. debhelper compat 14 is so new that I don't think
there is any practical benefit to delaying this change until compat
15.

I'm proposing a simple patch for this at
https://salsa.debian.org/debian/debhelper/-/merge_requests/165

Thank you,
Jeremy Bícha

#1142577#10
Date:
2026-07-22 09:22:18 UTC
From:
To:
One variation of this issue can be seen with deja-dup which
additionally needs some test binaries built before it can run them
with meson test. The default dh_auto_test run isn't verbose enough for
blhc.

The workaround I used was

execute_after_dh_auto_build:
ifeq (,$(filter nocheck,$(DEB_BUILD_PROFILES)))
        dh_auto_build -- meson-test-prereq
endif

See https://mesonbuild.com/Release-notes-for-1-7-0.html#test-targets-no-longer-built-by-default

If I use that snippet in quadrapassel where that extra build step is
not needed, the build still completes successfully and something like
this shows in the build log:

dh_auto_build -- meson-test-prereq
    cd obj-x86_64-linux-gnu && LC_ALL=C.UTF-8 ninja -j4 -v meson-test-prereq
ninja: no work to do.


I don't know how to make this additional change in debhelper.

Thank you,
Jeremy Bícha

#1142577#13
Date:
2026-07-22 10:45:12 UTC
From:
To:
Hello,

Bug #1142577 in debhelper reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/debian/debhelper/-/commit/d18a45d30d5fe8c52dfa52a8cc4307feca4158e8
------------------------------------------------------------------------
meson: Use meson install --no-rebuild by default for compat 14+

Closes: #1142577
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1142577

#1142577#20
Date:
2026-07-23 22:15:49 UTC
From:
To:
Meson specifically allows you to have steps that depend on the install
target but not the "all" target. These are typically for things that
would be slow and unnecessary during development but needed for system
installs. The problem here is not so much that some build steps happen
during install, but rather that "ninja install" is not using "-v". If it
did, the build steps would be shown and blch would be (presumably) happy.

If there are spurious rebuilds for "ninja install" after a "ninja all
(or test"), then that is either a bug in Meson or in the project's build
files. This can be a custom script that touches its input files or what
have you.