From 1b88b7426a3c5e3b4427501e67df141b0ee17934 Mon Sep 17 00:00:00 2001 From: Andre McCurdy Date: Thu, 23 Jul 2015 16:09:01 -0700 Subject: bitbake: 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. (Bitbake rev: bef724057f1ea81571dd3ac5a9cf862f818434b5) Signed-off-by: Andre McCurdy Signed-off-by: Richard Purdie --- bitbake/lib/bb/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 34399640c0..764163f37f 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/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) -- cgit v1.2.3-54-g00ecf