summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2024-04-16 16:50:33 -0400
committerMike Gilbert <floppym@gentoo.org>2024-04-19 19:10:45 -0400
commitafe0521495aeed0a22a3656e7bad193fba39805e (patch)
tree0c73741d7257f519a02e11174557360b55f5bb04 /eclass
parentapp-misc/broot: Stabilize 1.36.1 amd64, #930259 (diff)
downloadgentoo-afe0521495aeed0a22a3656e7bad193fba39805e.tar.gz
gentoo-afe0521495aeed0a22a3656e7bad193fba39805e.tar.bz2
gentoo-afe0521495aeed0a22a3656e7bad193fba39805e.zip
meson.eclass: preserve exit status in phase funcs
When the functions are called with nonfatal, we need to ensure 'popd' does not clobber the exit status of the called command. Update meson_src_configure as well just for consistency. Closes: https://bugs.gentoo.org/930119 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/meson.eclass20
1 files changed, 16 insertions, 4 deletions
diff --git a/eclass/meson.eclass b/eclass/meson.eclass
index 9d7f830e58b0..a22a85887584 100644
--- a/eclass/meson.eclass
+++ b/eclass/meson.eclass
@@ -425,7 +425,10 @@ 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[@]}"
- ) || die -n
+ )
+ local rv=$?
+ [[ ${rv} -eq 0 ]] || die -n "configure failed"
+ return ${rv}
}
# @FUNCTION: meson_src_compile
@@ -451,9 +454,12 @@ meson_src_compile() {
set -- meson compile "${mesoncompileargs[@]}"
echo "$@" >&2
- "$@" || die -n "compile failed"
+ "$@"
+ local rv=$?
+ [[ ${rv} -eq 0 ]] || die -n "compile failed"
popd > /dev/null || die
+ return ${rv}
}
# @FUNCTION: meson_src_test
@@ -473,9 +479,12 @@ meson_src_test() {
set -- meson test "${mesontestargs[@]}"
echo "$@" >&2
- "$@" || die -n "tests failed"
+ "$@"
+ local rv=$?
+ [[ ${rv} -eq 0 ]] || die -n "tests failed"
popd > /dev/null || die
+ return ${rv}
}
# @FUNCTION: meson_install
@@ -495,9 +504,12 @@ meson_install() {
set -- meson install "${mesoninstallargs[@]}"
echo "$@" >&2
- "$@" || die -n "install failed"
+ "$@"
+ local rv=$?
+ [[ ${rv} -eq 0 ]] || die -n "install failed"
popd > /dev/null || die
+ return ${rv}
}
# @FUNCTION: meson_src_install