Hi all,

I am experiencing problems with on target updates of the kernel in dunfell 
because the way runtime dependencies are generated have changed.

I was on thud before and the resulting runtime dependencies on the packages 
(rpm and bzImage in my case) where the following

  *   Package "kernel" requires "kernel-${KERNEL_VERSION_PKG_NAME}"
  *   Package "kernel-${KERNEL_VERSION_PKG_NAME}" requires 
"kernel-image-${KERNEL_VERSION_PKG_NAME}"
  *   Package "kernel-image-${KERNEL_VERSION_PKG_NAME}" requires 
"kernel-image-bzimage-${KERNEL_VERSION_PKG_NAME}"

In dunfell the resulting runtime dependencies are instead simply

  *   Package "kernel" requires "kernel-base"
  *   Package "kernel-${KERNEL_VERSION_PKG_NAME}" requires "kernel-image"
  *   Package "kernel-image-${KERNEL_VERSION_PKG_NAME}" requires 
"kernel-image-bzimage"

But as both the old and new kernel packages provide "kernel-image" and 
"kernel-image-bzimage", only the "kernel" package is updated, as it is the only 
package which increases its version / release (the other packages change names 
since ${KERNEL_VERSION_PKG_NAME} differs) and the "kernel-image" and 
"kernel-image-bzimage" dependencies are already satisfied by the old kernel.

I traced this change of behavior to OE-Core commit 
920beaaeef62b558e046f32c8ef0332250969ef1 (package: get_package_mapping: avoid 
dependency mapping if renamed package provides original name), included in 
gatesgarth but also backported to dunfell. Before this commit the package 
mapping took care of replacing the dependency on "kernel-image" added by 
kernel.bbclass to the actual package name, which is no longer the case.

What would be the correct way to address this?

One solution could be to have kernel.bbclass add versioned dependencies, like 
the following (the ones for RDEPENDS_${KERNEL_PACKAGE_NAME}-image would also 
need to be versioned in the same way).

RDEPENDS_${KERNEL_PACKAGE_NAME} = "${KERNEL_PACKAGE_NAME}-base (= 
${EXTENDPKGV})"
RDEPENDS_${KERNEL_PACKAGE_NAME}-base ?= "${KERNEL_PACKAGE_NAME}-image (= 
${EXTENDPKGV})"

Instead of the current

RDEPENDS_${KERNEL_PACKAGE_NAME} = "${KERNEL_PACKAGE_NAME}-base"
RDEPENDS_${KERNEL_PACKAGE_NAME}-base ?= "${KERNEL_PACKAGE_NAME}-image"

That solves the issue for me and it kind of makes sense that the "kernel", 
"kernel-${KERNEL_VERSION_PKG_NAME}" and 
"kernel-image-${KERNEL_VERSION_PKG_NAME}" packages always be at the same exact 
version, but I do not know if that would break some existing scenarios.

Best,

Diego
--
Diego Santa Cruz, PhD
Technology Architect
spinetix.com

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#146045): 
https://lists.openembedded.org/g/openembedded-core/message/146045
Mute This Topic: https://lists.openembedded.org/mt/79146415/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to