meson.eclass: hoist setup_meson_src_configure outside of subshell

Internally, it may call `die`, but the effects of such do not trigger
until the subshell completes. This meant that after it dies, meson setup
still runs after the traceback. In fact, the fact that it runs at all is
a problem, because a symptom of it running is that it runs *after* the
"If you need support, [...]" bit, and logs the command line followed by
"ERROR: Cannot find specified native file:".

This makes it quite frustrating to locate the actual error.

Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Eli Schwartz
2026-09-03 04:15:54 +02:00
committed by Michał Górny
parent c593619096
commit 524fd9500c
+7 -1
View File
@@ -490,8 +490,14 @@ meson_src_configure() {
# https://bugs.gentoo.org/625396
python_export_utf8_locale
# We do this outside the subshell and localize any variables the function
# itself sets, because it can internally die. If it ran inside the subshell,
# then after dying, `meson setup` still runs after "If you need support, [...]"
# and logs the command line followed by "ERROR: Cannot find specified native file:"
local NM READELF BOOST_INCLUDEDIR BOOST_LIBRARYDIR
setup_meson_src_configure "$@"
(
setup_meson_src_configure "$@"
MESONARGS+=(
# Source directory
"${EMESON_SOURCE:-${S}}"