packagegroup-kernel-modules-essential: dynamically generate RDEPENDS - #1053
packagegroup-kernel-modules-essential: dynamically generate RDEPENDS#1053gratian wants to merge 2 commits into
Conversation
Bump the major version for this packagegroup from the default 1.0 to 2.0 in preparation for introducing a dynamic way to specify kernel modules RDEPENDS which takes into account the fact that kernel modules packages names include the kernel version. Signed-off-by: Gratian Crisan <gratian.crisan@emerson.com>
Package names for kernels currently include the kernel version: ex. 'kernel-module-g-ether-6.12.74-rt16-g3da1661fb29d' This creates a problem when trying to upgrade this package group in an existing image install via a package manager tool like opkg. Since this recipe specifies the essential kernel modules via RDEPENDS and w/o the kernel version included in the name, upgrades do nothing. Switch to generating the RDEPENDS list dynamically and include the kernel version in the dependency name. This fixes the upgrade problem. Signed-off-by: Gratian Crisan <gratian.crisan@emerson.com>
There was a problem hiding this comment.
🟡 Human review recommended
Generating RDEPENDS at do_package time (after being empty at parse time) can change dependency visibility/behavior in ways that require validation in the layer’s packagegroup/packagefeed workflows.
Pull request overview
Updates the packagegroup-kernel-modules-essential recipe so its runtime dependencies match the versioned kernel-module package names, addressing package-manager upgrade behavior where unversioned RDEPENDS could remain satisfied by older, differently-versioned module packages.
Changes:
- Sets
PACKAGE_ARCHto${MACHINE_ARCH}for machine-specific dependency resolution. - Moves the module list into
KERNEL_MODULE_NAMESand generatesRDEPENDS:${PN}dynamically by suffixing each module with${KERNEL_VERSION}. - Adds a
do_packagedependency onvirtual/kernel:do_shared_workdirto support generating versioned dependencies.
File summaries
| File | Description |
|---|---|
| recipes-kernel/packagegroups/packagegroup-kernel-modules-essential_2.0.bb | Generates versioned kernel-module RDEPENDS dynamically to improve upgrade behavior. |
Review details
Comments suppressed due to low confidence (2)
recipes-kernel/packagegroups/packagegroup-kernel-modules-essential_2.0.bb:533
- RDEPENDS is being generated during do_package, but at parse time it is explicitly set to an empty string. This means the recipe metadata (e.g., dependency graph / any recursive runtime-dep build behavior driven off RDEPENDS) will not see the kernel-module dependencies until packaging runs, which can lead to targets like building the packagegroup/package feed not pulling the module packages into the build unless they’re built via another path.
This issue also appears on line 546 of the same file.
recipes-kernel/packagegroups/packagegroup-kernel-modules-essential_2.0.bb:546
d.appendVar('RDEPENDS:%s' % pn, ' ' + rdeps)will append a leading space even whenKERNEL_MODULE_NAMESis empty, leaving a stray whitespace value; it’s also simpler to only append when there’s at least one module.
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
Summary of Changes
Package names for kernels currently include the kernel version:
ex. 'kernel-module-g-ether-6.12.74-rt16-g3da1661fb29d'
This creates a problem when trying to upgrade this package group in an
existing image install via a package manager tool like opkg. Since this
recipe specifies the essential kernel modules via RDEPENDS and w/o the
kernel version included in the name, upgrades do nothing.
Switch to generating the RDEPENDS list dynamically and include the
kernel version in the dependency name. This fixes the upgrade problem.
Justification
Note: This was created as a prototype for AB#3911319. Staging as draft for referencing in work items. Requires testing before pull.
TODO: Justify why this contribution should be part of the project. Link to an AZDO work item with
AB#${AZDO ID}.Testing
TODO: Detail what testing has been done to ensure this submission meets requirements.
bitbake packagefeed-ni-core)Procedure