Noticed this when looking to add something else to meson_src_test. I don't
think the ${rv} bits can really be cleaned up (at least to a useful degree)
because we want the return value of the function to be ${rv}.

(We broke that in the past too so would rather be careful; see
afe0521495aeed0a22a3656e7bad193fba39805e).

Signed-off-by: Sam James <s...@gentoo.org>
---
 eclass/meson.eclass | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/eclass/meson.eclass b/eclass/meson.eclass
index a2bc5537e4589..382c80ec08214 100644
--- a/eclass/meson.eclass
+++ b/eclass/meson.eclass
@@ -1,4 +1,4 @@
-# Copyright 2017-2024 Gentoo Authors
+# Copyright 2017-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: meson.eclass
@@ -41,7 +41,7 @@ esac
 if [[ -z ${_MESON_ECLASS} ]]; then
 _MESON_ECLASS=1
 
-inherit flag-o-matic multiprocessing ninja-utils python-utils-r1 
toolchain-funcs
+inherit edo flag-o-matic multiprocessing ninja-utils python-utils-r1 
toolchain-funcs
 
 BDEPEND=">=dev-build/meson-1.2.3
        ${NINJA_DEPEND}
@@ -423,8 +423,7 @@ meson_src_configure() {
                )
 
                export -n {C,CPP,CXX,F,OBJC,OBJCXX,LD}FLAGS 
PKG_CONFIG_{LIBDIR,PATH}
-               echo meson setup "${MESONARGS[@]}" >&2
-               meson setup "${MESONARGS[@]}"
+               nonfatal edo meson setup "${MESONARGS[@]}"
        )
        local rv=$?
        [[ ${rv} -eq 0 ]] || die -n "configure failed"
@@ -465,9 +464,7 @@ meson_src_test() {
                "$@"
        )
 
-       set -- meson test "${mesontestargs[@]}"
-       echo "$@" >&2
-       "$@"
+       nonfatal edo "${mesontestargs[@]}"
        local rv=$?
        [[ ${rv} -eq 0 ]] || die -n "tests failed"
 
@@ -490,9 +487,7 @@ meson_install() {
                "$@"
        )
 
-       set -- meson install "${mesoninstallargs[@]}"
-       echo "$@" >&2
-       "$@"
+       nonfatal edo meson install "${mesoninstallargs[@]}"
        local rv=$?
        [[ ${rv} -eq 0 ]] || die -n "install failed"
 
-- 
2.49.0


Reply via email to