aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre McCurdy <armccurdy@gmail.com>2015-07-23 16:09:01 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-27 16:29:11 +0100
commitbef724057f1ea81571dd3ac5a9cf862f818434b5 (patch)
tree0d427529465d90bfc1d11fb17327a38639e7fc9f
parent100b447a161ef20fa559e39516cd32fa78e38262 (diff)
downloadbitbake-bef724057f1ea81571dd3ac5a9cf862f818434b5.tar.gz
build: Exit scripts with result of last shell function
Since shell scripts run with 'set -e' the final exit at the end of the script can only be returning 0. However, for correctness and to follow the original intention of the 'cleanup' commands, let's fix the typo and return the success of the last shell function rather than the success of unhooking the exit trap handler. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/build.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/build.py b/lib/bb/build.py
index 34399640c..764163f37 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -313,7 +313,7 @@ def exec_func_shell(func, d, runfile, cwd=None):
# cleanup
ret=$?
trap '' 0
-exit $?
+exit $ret
''')
os.chmod(runfile, 0775)