summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2016-01-01 13:27:10 +0100
committerMichał Górny <mgorny@gentoo.org>2016-01-08 06:14:36 +0100
commitfdcce60fc458b38f604d15b404720d92f5852278 (patch)
treefa11b7495f4612ae44d982d33d926586ef27526c /eclass
parentscons-utils.eclass: escons, invert EAPI check to cover future EAPIs (diff)
downloadgentoo-fdcce60fc458b38f604d15b404720d92f5852278.tar.gz
gentoo-fdcce60fc458b38f604d15b404720d92f5852278.tar.bz2
gentoo-fdcce60fc458b38f604d15b404720d92f5852278.zip
scons-utils.eclass: escons, respect nonfatal in EAPI 6
Diffstat (limited to 'eclass')
-rw-r--r--eclass/scons-utils.eclass14
1 files changed, 12 insertions, 2 deletions
diff --git a/eclass/scons-utils.eclass b/eclass/scons-utils.eclass
index 4defbac9c496..fe9160a0ed96 100644
--- a/eclass/scons-utils.eclass
+++ b/eclass/scons-utils.eclass
@@ -107,7 +107,8 @@ fi
# @DESCRIPTION:
# Call scons, passing the supplied arguments, ${myesconsargs[@]},
# filtered ${MAKEOPTS}, ${EXTRA_ESCONS}. Similar to emake. Like emake,
-# this function does die on failure in EAPI 4.
+# this function does die on failure in EAPI 4. Respects nonfatal
+# in EAPI 6 and newer.
escons() {
local ret
@@ -121,7 +122,16 @@ escons() {
ret=${?}
if [[ ${ret} -ne 0 ]]; then
- [[ ${EAPI:-0} != [0123] ]] && die "escons failed."
+ case "${EAPI:-0}" in
+ 0|1|2|3) # nonfatal in EAPIs 0 through 3
+ ;;
+ 4|5) # 100% fatal in 4 & 5
+ die "escons failed."
+ ;;
+ *) # respect nonfatal in 6 onwards
+ die -n "escons failed."
+ ;;
+ esac
fi
return ${ret}
}