From 524fd9500cfac87e4076bc6c634ae9cebc3fbd2f Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Wed, 2 Sep 2026 00:25:53 -0400 Subject: [PATCH] meson.eclass: hoist setup_meson_src_configure outside of subshell MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Michał Górny --- eclass/meson.eclass | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/eclass/meson.eclass b/eclass/meson.eclass index 0f6e7852a4d0e..e0d7a01783861 100644 --- a/eclass/meson.eclass +++ b/eclass/meson.eclass @@ -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}}"