path: root/meta/classes
diff options
authorBruce Ashfield <>2016-12-09 14:28:00 -0500
committerRichard Purdie <>2017-01-11 11:46:52 +0000
commita4888a63620fa05e1399355d9e20c2da586efb4c (patch)
tree12c097d63c8c32da93904e6907b10dfb505eb6de /meta/classes
parentd7ca7a37c8a5f8baefadc44bdfc1a697d2fe4616 (diff)
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 <> Signed-off-by: Ross Burton <> Signed-off-by: Richard Purdie <> Signed-off-by: Armin Kuster <>
Diffstat (limited to 'meta/classes')
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):
return default
do_kernel_metadata() {
+ set +e
cd ${S}
export KMETA=${KMETA}
@@ -148,12 +149,18 @@ do_kernel_metadata() {
elements="`echo -n ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES}`"
if [ -n "${elements}" ]; then
scc --force -o ${S}/${meta_dir}:cfg,meta ${includes} ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES}
+ if [ $? -ne 0 ]; then
+ bbfatal_log "Could not generate configuration queue for ${KMACHINE}."
+ fi
# run2: only generate patches for elements that have been passed on the SRC_URI
elements="`echo -n ${sccs} ${patches} ${KERNEL_FEATURES}`"
if [ -n "${elements}" ]; then
scc --force -o ${S}/${meta_dir}:patch --cmds patch ${includes} ${sccs} ${patches} ${KERNEL_FEATURES}
+ if [ $? -ne 0 ]; then
+ bbfatal_log "Could not generate configuration queue for ${KMACHINE}."
+ fi