Skip to contentSkip to conversation

kernel-yocto: yet another set of changes

PATCH New Bruce Ashfield 1 participant 3 messages Dec 9, 2016

lore
Share & tools
lore
#0 lore raw

cover kernel-yocto: yet another set of changes

In the never ending stream of kernel pull requests, we have an update to the latest 4.8-rt from Paul Gortmaker.

And as it turns out, my effor in making sure that meta data errors were trapped was a bit to simple. I do in fact need the set +e to allow some of the other checks in the routine to follow else clauses.

So there's a patch in this pull that puts the +e back, and I explicitly trap and error if a meta data command fails.

Cheers,

Bruce

The following changes since commit 36e178a62f04e7f2611b26964efe46b9af97189a:

linux-yocto: Update genericx86* SRCREVs for linux-yocto 4.8 (2016-12-09 08:54:07 +0000)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib zedd/kernel
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=zedd/kernel

Bruce Ashfield (2):
linux-yocto/4.8: update to -rt7
kernel-yocto: explicitly trap subcommand errors

 meta/classes/kernel-yocto.bbclass                 | 7 +++++++
 meta/recipes-kernel/linux/linux-yocto-rt_4.8.bb   | 4 ++--
 meta/recipes-kernel/linux/linux-yocto-tiny_4.8.bb | 2 +-
 meta/recipes-kernel/linux/linux-yocto_4.8.bb      | 2 +-
 4 files changed, 11 insertions(+), 4 deletions(-)
Signature · 1 line
2.5.0
#1 lore raw

PATCH 1/2 linux-yocto/4.8: update to -rt7

Updating to the latest 4.8-rt

---
 meta/recipes-kernel/linux/linux-yocto-rt_4.8.bb   | 4 ++--
 meta/recipes-kernel/linux/linux-yocto-tiny_4.8.bb | 2 +-
 meta/recipes-kernel/linux/linux-yocto_4.8.bb      | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
meta/recipes-kernel/linux/linux-yocto-rt_4.8.bb +2 -2
index 8ed9d8f3743f..d392a6de5e95 100644
@@ -11,8 +11,8 @@ python () {
         raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
 }
 
-SRCREV_machine ?= "b2d665b3453891cd066c8a172af0b7785c365f57"
-SRCREV_meta ?= "b22e47739683444916dc64548df1dbf6856500a5"
+SRCREV_machine ?= "3bafd55e39da7fd7c5d483fdee5b72450df3caf0"
+SRCREV_meta ?= "926c93ae07de2173b4f764d1da6996597a6d2b73"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.8.git;branch=${KBRANCH};name=machine \
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.8;destsuffix=${KMETA}"
meta/recipes-kernel/linux/linux-yocto-tiny_4.8.bb +1 -1
index 43dc34bd25a4..15b03579d4a3 100644
@@ -10,7 +10,7 @@ KMETA = "kernel-meta"
 KCONF_BSP_AUDIT_LEVEL = "2"
 
 SRCREV_machine ?= "e274a507b23c23bf0dd6502d0c38fae731c11511"
-SRCREV_meta ?= "b22e47739683444916dc64548df1dbf6856500a5"
+SRCREV_meta ?= "926c93ae07de2173b4f764d1da6996597a6d2b73"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
meta/recipes-kernel/linux/linux-yocto_4.8.bb +1 -1
index 090358873b46..aedfe1b1556e 100644
@@ -19,7 +19,7 @@ SRCREV_machine_qemux86 ?= "021b4aef55b44597587a1ce5879be642b3dca155"
 SRCREV_machine_qemux86-64 ?= "021b4aef55b44597587a1ce5879be642b3dca155"
 SRCREV_machine_qemumips64 ?= "1b20066b88c3abdde1f6c449b6562a516b4cce6d"
 SRCREV_machine ?= "021b4aef55b44597587a1ce5879be642b3dca155"
-SRCREV_meta ?= "b22e47739683444916dc64548df1dbf6856500a5"
+SRCREV_meta ?= "926c93ae07de2173b4f764d1da6996597a6d2b73"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.8.git;name=machine;branch=${KBRANCH}; \
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.8;destsuffix=${KMETA}"
Signature · 1 line
2.5.0
#2 lore raw

PATCH 2/2 kernel-yocto: explicitly trap subcommand errors

In reply to Bruce Ashfield

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.

---
 meta/classes/kernel-yocto.bbclass | 7 +++++++
 1 file changed, 7 insertions(+)
meta/classes/kernel-yocto.bbclass +7 -0
index 7c32c9664610..a60327a07e50 100644
@@ -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
 	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
 	fi
 }
 
Signature · 1 line
2.5.0