diff options
author | Andrew Bartlett <abartlet@samba.org> | 2022-06-21 19:23:26 +1200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2022-06-22 16:43:30 +0000 |
commit | 9788e92bf1251b4791ca84e83aa9437101e7d436 (patch) | |
tree | 449c44f810f62584c477e7634021faf9908287ed | |
parent | 6f96bb40e79574af2cd5579557c196be07b5c9f2 (diff) | |
download | samba-9788e92bf1251b4791ca84e83aa9437101e7d436.tar.gz |
build: Ensure that SAMBA_GENERATOR() tasks fail on error
Previously the error from inside the shell was eaten.
This showed up particularly as a failure to notice errors when running xsltproc
to build the manpages.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Jun 22 16:43:30 UTC 2022 on sn-devel-184
-rw-r--r-- | buildtools/wafsamba/wafsamba.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py index 063f9d2ed75..79f352878a8 100644 --- a/buildtools/wafsamba/wafsamba.py +++ b/buildtools/wafsamba/wafsamba.py @@ -913,12 +913,19 @@ def SAMBA_GENERATOR(bld, name, rule, source='', target='', dep_vars.append('ruledeps') dep_vars.append('SAMBA_GENERATOR_VARS') + shell=isinstance(rule, str) + + # This ensures that if the command (executed in the shell) fails + # (returns non-zero), the build fails + if shell: + rule = "set -e; " + rule + bld.SET_BUILD_GROUP(group) t = bld( rule=rule, source=bld.EXPAND_VARIABLES(source, vars=vars), + shell=shell, target=target, - shell=isinstance(rule, str), update_outputs=True, before='c', ext_out='.c', |