[RFC] Revert "kernel: make kernel-base recommend kernel-image, not depend"

Message ID 20220508110416.51510-1-max.oss.09@gmail.com
State New
Headers show
Series [RFC] Revert "kernel: make kernel-base recommend kernel-image, not depend" | expand

Commit Message

Max Krummenacher May 8, 2022, 11:04 a.m. UTC
From: Max Krummenacher <max.krummenacher@toradex.com>

This reverts commit 1c90b27d2c65cfb4f9debf0272820b6a95942f76. [2]

To exclude the kernel image from the final rootfs the documentation [1]
suggest to override `RDEPENDS:${KERNEL_PACKAGE_NAME}-base`.
With the change to RRECOMMENDS all layers which followed that suggestion
now do get the kernel image as the override has no longer any effect.
(a affected machine: openembedded-core/meta/conf/machine/include/qemu.inc)

Is the use case described in the commit not solvable with less severe
side effects?

[1] https://docs.yoctoproject.org/singleindex.html#how-do-i-install-not-install-the-kernel-image-on-the-root-filesystem
[2] https://git.openembedded.org/openembedded-core/commit/meta/classes/kernel.bbclass?h=master-next&id=1c90b27d2c65cfb4f9debf0272820b6a95942f76

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
---
 meta/classes/kernel.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Richard Purdie May 8, 2022, 12:47 p.m. UTC | #1
On Sun, 2022-05-08 at 13:04 +0200, Max Krummenacher wrote:
> From: Max Krummenacher <max.krummenacher@toradex.com>
> 
> This reverts commit 1c90b27d2c65cfb4f9debf0272820b6a95942f76. [2]
> 
> To exclude the kernel image from the final rootfs the documentation [1]
> suggest to override `RDEPENDS:${KERNEL_PACKAGE_NAME}-base`.
> With the change to RRECOMMENDS all layers which followed that suggestion
> now do get the kernel image as the override has no longer any effect.
> (a affected machine: openembedded-core/meta/conf/machine/include/qemu.inc)
> 
> Is the use case described in the commit not solvable with less severe
> side effects?
> 
> [1] https://docs.yoctoproject.org/singleindex.html#how-do-i-install-not-install-the-kernel-image-on-the-root-filesystem
> [2] https://git.openembedded.org/openembedded-core/commit/meta/classes/kernel.bbclass?h=master-next&id=1c90b27d2c65cfb4f9debf0272820b6a95942f76
> 
> Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
> ---
>  meta/classes/kernel.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

That patch did solve a real world issue and I'm not sure how else we're
fix it. As such I think we'll need to update the documentation.

We should be able to add some kind of warning to let BSPs know
something needs updating too? Would that help?

Cheers,

Richard

Patch

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 8299b394a7..25edf17e9e 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -652,7 +652,7 @@  FILES:${KERNEL_PACKAGE_NAME}-modules = ""
 RDEPENDS:${KERNEL_PACKAGE_NAME} = "${KERNEL_PACKAGE_NAME}-base (= ${EXTENDPKGV})"
 # Allow machines to override this dependency if kernel image files are
 # not wanted in images as standard
-RRECOMMENDS:${KERNEL_PACKAGE_NAME}-base ?= "${KERNEL_PACKAGE_NAME}-image (= ${EXTENDPKGV})"
+RDEPENDS:${KERNEL_PACKAGE_NAME}-base ?= "${KERNEL_PACKAGE_NAME}-image (= ${EXTENDPKGV})"
 PKG:${KERNEL_PACKAGE_NAME}-image = "${KERNEL_PACKAGE_NAME}-image-${@legitimize_package_name(d.getVar('KERNEL_VERSION'))}"
 RDEPENDS:${KERNEL_PACKAGE_NAME}-image += "${@oe.utils.conditional('KERNEL_IMAGETYPE', 'vmlinux', '${KERNEL_PACKAGE_NAME}-vmlinux (= ${EXTENDPKGV})', '', d)}"
 PKG:${KERNEL_PACKAGE_NAME}-base = "${KERNEL_PACKAGE_NAME}-${@legitimize_package_name(d.getVar('KERNEL_VERSION'))}"