diff options
authorBruce Ashfield <>2012-08-28 06:41:47 (GMT)
committerRichard Purdie <>2012-09-28 15:53:09 (GMT)
commit4ef357f033bcfe4725131ce1a19334b4adeeae01 (patch)
parent91714ea8ae0c75b33cca0e8259e3410779129150 (diff)
kernel.bbclass: add non-santized kernel provides
If the kernel version string uses characters or symbols that need to be santized for the package name, we can end up with a mismatch between module requirements and what the kernel provides. The kernel version is pulled from utsrelease.h, which contains the exact string that was passed to the kernel build, not one that is santized, this can result in: echo "CONFIG_LOCALVERSION="\"MYVER+snapshot_standard\" >> ${B}/.config <build> % rpm -qp kernel-module-uvesafb-3.4-r0.qemux86.rpm --requires update-modules kernel-3.4.3-MYVER+snapshot_standard % rpm -qp kernel-3.4.3-myver+snapshot-standard-3.4-r0.qemux86.rpm --provides kernel-3.4.3-myver+snapshot-standard = 3.4-r0 At rootfs assembly time, we'll have a dependency issue with the kernel providing the santizied string and the modules requiring the utsrelease.h string. To not break existing use cases, we can add a second provides to the kernel packaging with the unsantized version string, and allowing the kernel module packaging to be unchanged. RPROVIDES_kernel-base += "kernel-${KERNEL_VERSION}" % rpm -qp kernel-3.4.3-myver+snapshot-standard-3.4-r0.qemux86.rpm --provides kernel-3.4.3-MYVER+snapshot_standard kernel-3.4.3-myver+snapshot-standard = 3.4-r0 (From OE-Core rev: 0af1d1412add1baf3f6c1a5cfb2e4f92fb6a85dc) Signed-off-by: Bruce Ashfield <> Signed-off-by: Richard Purdie <>
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index d79ba9f..5de270f 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -262,6 +262,7 @@ RDEPENDS_kernel = "kernel-base"
262RDEPENDS_kernel-base ?= "kernel-image" 262RDEPENDS_kernel-base ?= "kernel-image"
263PKG_kernel-image = "kernel-image-${@legitimize_package_name('${KERNEL_VERSION}')}" 263PKG_kernel-image = "kernel-image-${@legitimize_package_name('${KERNEL_VERSION}')}"
264PKG_kernel-base = "kernel-${@legitimize_package_name('${KERNEL_VERSION}')}" 264PKG_kernel-base = "kernel-${@legitimize_package_name('${KERNEL_VERSION}')}"
265RPROVIDES_kernel-base += "kernel-${KERNEL_VERSION}"
265ALLOW_EMPTY_kernel = "1" 266ALLOW_EMPTY_kernel = "1"
266ALLOW_EMPTY_kernel-base = "1" 267ALLOW_EMPTY_kernel-base = "1"
267ALLOW_EMPTY_kernel-image = "1" 268ALLOW_EMPTY_kernel-image = "1"