diff options
author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2016-12-09 14:28:00 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-13 22:55:21 +0000 |
commit | e3d51adafd4f9dcee84ca148c2b7b68d26cb35a7 (patch) | |
tree | ecea1b77438ed790f9d5efb9c756525b7de5da31 /meta/classes | |
parent | 89d515b2cec1371efedbf542f9779d206acc846e (diff) | |
download | poky-e3d51adafd4f9dcee84ca148c2b7b68d26cb35a7.tar.gz |
kernel-yocto: explicitly trap subcommand errors
To trap errors and halt processing, do_kernel_metadata was recently
switched to exit on any non zero return code. While the concept is
sound, there are subcommands that have legitimate non-zero return
codes.
Instead of removing set +e, we'll explicitly check the return code
of the commands that can error, and throw a bbfatal to alert the
user.
(From OE-Core rev: a4705e62d0973c290011fc0d250501d358b659e8)
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/kernel-yocto.bbclass | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass index 7c32c96646..a60327a07e 100644 --- a/meta/classes/kernel-yocto.bbclass +++ b/meta/classes/kernel-yocto.bbclass | |||
@@ -61,6 +61,7 @@ def get_machine_branch(d, default): | |||
61 | return default | 61 | return default |
62 | 62 | ||
63 | do_kernel_metadata() { | 63 | do_kernel_metadata() { |
64 | set +e | ||
64 | cd ${S} | 65 | cd ${S} |
65 | export KMETA=${KMETA} | 66 | export KMETA=${KMETA} |
66 | 67 | ||
@@ -148,12 +149,18 @@ do_kernel_metadata() { | |||
148 | elements="`echo -n ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES}`" | 149 | elements="`echo -n ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES}`" |
149 | if [ -n "${elements}" ]; then | 150 | if [ -n "${elements}" ]; then |
150 | scc --force -o ${S}/${meta_dir}:cfg,meta ${includes} ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES} | 151 | scc --force -o ${S}/${meta_dir}:cfg,meta ${includes} ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES} |
152 | if [ $? -ne 0 ]; then | ||
153 | bbfatal_log "Could not generate configuration queue for ${KMACHINE}." | ||
154 | fi | ||
151 | fi | 155 | fi |
152 | 156 | ||
153 | # run2: only generate patches for elements that have been passed on the SRC_URI | 157 | # run2: only generate patches for elements that have been passed on the SRC_URI |
154 | elements="`echo -n ${sccs} ${patches} ${KERNEL_FEATURES}`" | 158 | elements="`echo -n ${sccs} ${patches} ${KERNEL_FEATURES}`" |
155 | if [ -n "${elements}" ]; then | 159 | if [ -n "${elements}" ]; then |
156 | scc --force -o ${S}/${meta_dir}:patch --cmds patch ${includes} ${sccs} ${patches} ${KERNEL_FEATURES} | 160 | scc --force -o ${S}/${meta_dir}:patch --cmds patch ${includes} ${sccs} ${patches} ${KERNEL_FEATURES} |
161 | if [ $? -ne 0 ]; then | ||
162 | bbfatal_log "Could not generate configuration queue for ${KMACHINE}." | ||
163 | fi | ||
157 | fi | 164 | fi |
158 | } | 165 | } |
159 | 166 | ||