Skip to contentSkip to conversation

RFC [v3]: Make kernel upgrades via dnf work like on Red Hat

PATCH In review Zoltan Boszormenyi 2 participants 5 messages Sep 30, 2021 – Oct 5, 2021 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

I have observed two issues when upgrading kernel versions successively.

One is that when installonly_limit is reached in dnf, only the main kernel package was removed. Patch 1 fixes this by adding extra RDEPENDS to the kernel subpackages on the main kernel package. This circular dependency helps package managers to remove all subpackages. Only rpm packages was build tested, the dependencies are in place for both 0 and 1 for KERNEL_SPLIT_MODULES. dnf upgrade is doing the right thing now with removing all subpackages of the oldest kernel version.

dnf.conf settings "installonlypkgs", "installonly_limit" and others are documented at https://dnf.readthedocs.io/en/latest/conf_ref.html

The second issue is that when the oldest kernel version is removed by dnf, the /boot/bzImage symlink is also gone. It seems that with dnf, postrm of the old version is run later than postinst of the new one.

Fix this by using update-alternatives instead of hardcoded ln -s and rm -f. This is configurable via a new variable.

This is still an RFC.

1) The first fix is applied in both cases of KERNEL_SPLIT_MODULES=0 and 1. It's applied unconditionally.

2) The new knob name for patch #2 is KERNEL_IMAGEDEST_USE_UPDATE_ALTERNATIVES. It is admittedly too chatty, it can be renamed if someone suggests a better name.

2) There's an extra issue I found while implementing the second patch:
even with moving generating the alternative priority value to a python function and using a non-expanded substitution, it's still expanded during early parsing. The result is thrown away so it doesn't cause basehash issues, but still, the function needs to protect itself against KERNEL_VERSION being unset.

Please comment.

Best regards,
Zoltán Böszörményi

#2 lore raw

PATCH v3 1/2 kernel, kernel-module-split: Add runtime dependency to subpackages on main package

From: Zoltán Böszörményi <[email protected]>

This creates a circular dependency between the main kernel package and its subpackages. It helps package managers to automatically remove all kernel packages of the same version when upgrading.

---
v2: No changes

v3: Add reverse RDEPENDS to subpackages unconditionally
Handle KERNEL_SPLIT_MODULES=1 (default) case in meta/classes/kernel-module-split.bbclass

 meta/classes/kernel-module-split.bbclass | 5 +++--
 meta/classes/kernel.bbclass              | 7 ++++++-
 2 files changed, 9 insertions(+), 3 deletions(-)
meta/classes/kernel-module-split.bbclass +3 -2
index a29c294810..2ddcea538c 100644
@@ -176,8 +176,9 @@ python split_kernel_module_packages () {
     module_pattern = module_pattern_prefix + kernel_package_name + '-module-%s' + module_pattern_suffix
 
     modules = do_split_packages(d, root='${nonarch_base_libdir}/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='%s-%s' % (kernel_package_name, kernel_version))
-    if modules:
-        d.appendVar('RDEPENDS:' + metapkg, ' '+' '.join(modules))
+    for mod in modules:
+        d.appendVar('RDEPENDS:' + metapkg, ' %s (= ${EXTENDPKGV})' % mod)
+        d.appendVar('RDEPENDS:' + mod, ' %s (= ${EXTENDPKGV})' % kernel_package_name)
 
     # If modules-load.d and modprobe.d are empty at this point, remove them to
     # avoid warnings. removedirs only raises an OSError if an empty
meta/classes/kernel.bbclass +6 -1
index 4acec1877e..afd9f8045e 100644
@@ -98,7 +98,9 @@ python __anonymous () {
         typelower = type.lower()
         d.appendVar('PACKAGES', ' %s-image-%s' % (kname, typelower))
         d.setVar('FILES:' + kname + '-image-' + typelower, '/' + imagedest + '/' + type + '-${KERNEL_VERSION_NAME}' + ' /' + imagedest + '/' + type)
+        d.appendVar('RDEPENDS:%s-image' % kname, ' %s (= ${EXTENDPKGV})' % kname)
         d.appendVar('RDEPENDS:%s-image' % kname, ' %s-image-%s (= ${EXTENDPKGV})' % (kname, typelower))
+        d.appendVar('RDEPENDS:%s-image-%s' % (kname, typelower), ' %s (= ${EXTENDPKGV})' % kname)
         splitmods = d.getVar("KERNEL_SPLIT_MODULES")
         if splitmods != '1':
             d.appendVar('RDEPENDS:%s-image' % kname, ' %s-modules (= ${EXTENDPKGV})' % kname)
@@ -627,8 +629,11 @@ 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
 RDEPENDS:${KERNEL_PACKAGE_NAME}-base ?= "${KERNEL_PACKAGE_NAME}-image (= ${EXTENDPKGV})"
+RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append = " ${KERNEL_PACKAGE_NAME} (= ${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)}"
+RDEPENDS:${KERNEL_PACKAGE_NAME}-image:append = "${@oe.utils.conditional('KERNEL_IMAGETYPE', 'vmlinux', ' ${KERNEL_PACKAGE_NAME}-vmlinux (= ${EXTENDPKGV})', '', d)}"
+RDEPENDS:${KERNEL_PACKAGE_NAME}-vmlinux:append = "${@oe.utils.conditional('KERNEL_IMAGETYPE', 'vmlinux', ' ${KERNEL_PACKAGE_NAME} (= ${EXTENDPKGV})', '', d)}"
+RDEPENDS:${KERNEL_PACKAGE_NAME}-modules:append = " ${KERNEL_PACKAGE_NAME} (= ${EXTENDPKGV})"
 PKG:${KERNEL_PACKAGE_NAME}-base = "${KERNEL_PACKAGE_NAME}-${@legitimize_package_name(d.getVar('KERNEL_VERSION'))}"
 RPROVIDES:${KERNEL_PACKAGE_NAME}-base += "${KERNEL_PACKAGE_NAME}-${KERNEL_VERSION}"
 ALLOW_EMPTY:${KERNEL_PACKAGE_NAME} = "1"
Signature · 1 line
2.31.1
#5 lore raw

PATCH v3 2/2 kernel.bbclass: Allow using update-alternatives for the kernel image

In reply to Zoltan Boszormenyi

From: Zoltán Böszörményi <[email protected]>

When using dnf to install new kernel versions and installonly_limit is reached, dnf automatically removes the oldest kernel version. For the dnf.conf documentation on installonlypkgs, installonly_limit and others settings, see:
https://dnf.readthedocs.io/en/latest/conf_ref.html

When this happens, the kernel image symlink is removed because
1) the postrm script uses rm -f /boot/<image-type> and
2) postrm for the old version is run later than postinst of the new one with dnf.

Obviously, it makes the system fail to boot the next time. Theoretically, this may happen for any package manager.

Allow using the alternative symlink machinery so the highest kernel version takes precedence and the symlink always stays in place. This depends on the new variable called KERNEL_IMAGEDEST_USE_UPDATE_ALTERNATIVES. If it's set to non-0 then update-alternatives is used. Default is 0.

---
v2: Mention dnf.conf documentation link
Protect against "IndexError: list index out of range"

v3: Make update-alternatives --install work for do_rootfs
Move constructing alternative priority to a python function Fix indentation of postinst/postrm scripts

 meta/classes/kernel.bbclass | 39 +++++++++++++++++++++++++++----------
 1 file changed, 29 insertions(+), 10 deletions(-)
meta/classes/kernel.bbclass +29 -10
index afd9f8045e..40f3361053 100644
@@ -42,6 +42,16 @@ KERNEL_VERSION_NAME[vardepvalue] = "${LINUX_VERSION}"
 KERNEL_VERSION_PKG_NAME = "${@legitimize_package_name(d.getVar('KERNEL_VERSION'))}"
 KERNEL_VERSION_PKG_NAME[vardepvalue] = "${LINUX_VERSION}"
 
+def kernel_alternative_priority(d):
+    import re
+    kver =  d.getVar("KERNEL_VERSION")
+    kverp = re.compile('[\.-]')
+    kvparts = kverp.split(kver)
+    if len(kvparts) >= 3:
+        return str(kvparts[0])+str(kvparts[1]).zfill(2)+str(kvparts[2]).zfill(3)
+    else:
+        return "000000"
+
 python __anonymous () {
     pn = d.getVar("PN")
     kpn = d.getVar("KERNEL_PACKAGE_NAME")
@@ -111,23 +121,31 @@ python __anonymous () {
         d.setVar('PKG:%s-image-%s' % (kname,typelower), '%s-image-%s-${KERNEL_VERSION_PKG_NAME}' % (kname, typelower))
         d.setVar('ALLOW_EMPTY:%s-image-%s' % (kname, typelower), '1')
         d.setVar('pkg_postinst:%s-image-%s' % (kname,typelower), """set +e
-if [ -n "$D" ]; then
-    ln -sf %s-${KERNEL_VERSION} $D/${KERNEL_IMAGEDEST}/%s > /dev/null 2>&1
+if [ "${KERNEL_IMAGEDEST_USE_UPDATE_ALTERNATIVES}" != "0" ]; then
+    update-alternatives --install /${KERNEL_IMAGEDEST}/%s %s %s-${KERNEL_VERSION_NAME} ${@kernel_alternative_priority(d)}
 else
-    ln -sf %s-${KERNEL_VERSION} ${KERNEL_IMAGEDEST}/%s > /dev/null 2>&1
-    if [ $? -ne 0 ]; then
-        echo "Filesystem on ${KERNEL_IMAGEDEST}/ doesn't support symlinks, falling back to copied image (%s)."
-        install -m 0644 ${KERNEL_IMAGEDEST}/%s-${KERNEL_VERSION} ${KERNEL_IMAGEDEST}/%s
+    if [ -n "$D" ]; then
+        ln -sf %s-${KERNEL_VERSION} $D/${KERNEL_IMAGEDEST}/%s > /dev/null 2>&1
+    else
+        ln -sf %s-${KERNEL_VERSION} ${KERNEL_IMAGEDEST}/%s > /dev/null 2>&1
+        if [ $? -ne 0 ]; then
+            echo "Filesystem on ${KERNEL_IMAGEDEST}/ doesn't support symlinks, falling back to copied image (%s)."
+            install -m 0644 ${KERNEL_IMAGEDEST}/%s-${KERNEL_VERSION} ${KERNEL_IMAGEDEST}/%s
+        fi
     fi
 fi
 set -e
-""" % (type, type, type, type, type, type, type))
+""" % (type, type, type, type, type, type, type, type, type, type))
         d.setVar('pkg_postrm:%s-image-%s' % (kname,typelower), """set +e
-if [ -f "${KERNEL_IMAGEDEST}/%s" -o -L "${KERNEL_IMAGEDEST}/%s" ]; then
-    rm -f ${KERNEL_IMAGEDEST}/%s  > /dev/null 2>&1
+if [ "${KERNEL_IMAGEDEST_USE_UPDATE_ALTERNATIVES}" != "0" ]; then
+    update-alternatives --remove %s %s-${KERNEL_VERSION_NAME}
+else
+    if [ -f "${KERNEL_IMAGEDEST}/%s" -o -L "${KERNEL_IMAGEDEST}/%s" ]; then
+        rm -f ${KERNEL_IMAGEDEST}/%s  > /dev/null 2>&1
+    fi
 fi
 set -e
-""" % (type, type, type))
+""" % (type, type, type, type, type))
 
 
     image = d.getVar('INITRAMFS_IMAGE')
@@ -208,6 +226,7 @@ KERNEL_RELEASE ?= "${KERNEL_VERSION}"
 # The directory where built kernel lies in the kernel tree
 KERNEL_OUTPUT_DIR ?= "arch/${ARCH}/boot"
 KERNEL_IMAGEDEST ?= "boot"
+KERNEL_IMAGEDEST_USE_UPDATE_ALTERNATIVES ?= "0"
 
 #
 # configuration
Signature · 1 line
2.31.1
#3 lore raw

Re: [OE-core] [PATCH v3 1/2] kernel, kernel-module-split: Add runtime dependency to subpackages on main package

In reply to Zoltan Boszormenyi

Hello,

Quoted 23 lines · Zoltan Boszormenyi via lists.openembedded.org

From: Zoltán Böszörményi <[email protected]>

This creates a circular dependency between the main kernel package and its subpackages. It helps package managers to automatically remove all kernel packages of the same version when upgrading.

---
v2: No changes

v3: Add reverse RDEPENDS to subpackages unconditionally
Handle KERNEL_SPLIT_MODULES=1 (default) case in meta/classes/kernel-module-split.bbclass

 meta/classes/kernel-module-split.bbclass | 5 +++--
 meta/classes/kernel.bbclass              | 7 ++++++-
 2 files changed, 9 insertions(+), 3 deletions(-)
meta/classes/kernel-module-split.bbclass +0 -0
index a29c294810..2ddcea538c 100644

meta/classes/kernel-module-split.bbclass python split_kernel_module_packages () { · line 182

Quoted 9 lines
meta/classes/kernel-module-split.bbclass +3 -2
@@ -176,8 +176,9 @@ python split_kernel_module_packages () {
     module_pattern = module_pattern_prefix + kernel_package_name + '-module-%s' + module_pattern_suffix
 
     modules = do_split_packages(d, root='${nonarch_base_libdir}/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='%s-%s' % (kernel_package_name, kernel_version))
-    if modules:
-        d.appendVar('RDEPENDS:' + metapkg, ' '+' '.join(modules))
+    for mod in modules:
+        d.appendVar('RDEPENDS:' + metapkg, ' %s (= ${EXTENDPKGV})' % mod)
+        d.appendVar('RDEPENDS:' + mod, ' %s (= ${EXTENDPKGV})' % kernel_package_name)
 

I believe this causes the following issues:

https://autobuilder.yoctoproject.org/typhoon/#/builders/72/builds/4135/steps/18/logs/stdio

Error:
Problem: package hello-mod-0.1-r0.qemux86_64 requires kernel-module-hello-5.14.6-yocto-standard = 0.1-r0, but none of the providers can be installed

https://autobuilder.yoctoproject.org/typhoon/#/builders/82/builds/2342/steps/11/logs/stdio

Error:
Problem: package lttng-tools-ptest-2.13.0-r0.cortexa57 requires lttng-modules, but none of the providers can be installed
- package lttng-modules-2.13.0-r0.qemuarm64 requires kernel-module-lttng-wrapper-5.14.6-yocto-standard = 2.13.0-r0, but none of the providers can be installed
- conflicting requests
- nothing provides kernel = 2.13.0-r0 needed by kernel-module-lttng-wrapper-5.14.6-yocto-standard-2.13.0-r0.qemuarm64
(try to add '--skip-broken' to skip uninstallable packages)

Quoted 36 lines
meta/classes/kernel-module-split.bbclass +0 -0
     # If modules-load.d and modprobe.d are empty at this point, remove them to
     # avoid warnings. removedirs only raises an OSError if an empty
meta/classes/kernel.bbclass +6 -1
index 4acec1877e..afd9f8045e 100644
@@ -98,7 +98,9 @@ python __anonymous () {
         typelower = type.lower()
         d.appendVar('PACKAGES', ' %s-image-%s' % (kname, typelower))
         d.setVar('FILES:' + kname + '-image-' + typelower, '/' + imagedest + '/' + type + '-${KERNEL_VERSION_NAME}' + ' /' + imagedest + '/' + type)
+        d.appendVar('RDEPENDS:%s-image' % kname, ' %s (= ${EXTENDPKGV})' % kname)
         d.appendVar('RDEPENDS:%s-image' % kname, ' %s-image-%s (= ${EXTENDPKGV})' % (kname, typelower))
+        d.appendVar('RDEPENDS:%s-image-%s' % (kname, typelower), ' %s (= ${EXTENDPKGV})' % kname)
         splitmods = d.getVar("KERNEL_SPLIT_MODULES")
         if splitmods != '1':
             d.appendVar('RDEPENDS:%s-image' % kname, ' %s-modules (= ${EXTENDPKGV})' % kname)
@@ -627,8 +629,11 @@ 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
 RDEPENDS:${KERNEL_PACKAGE_NAME}-base ?= "${KERNEL_PACKAGE_NAME}-image (= ${EXTENDPKGV})"
+RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append = " ${KERNEL_PACKAGE_NAME} (= ${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)}"
+RDEPENDS:${KERNEL_PACKAGE_NAME}-image:append = "${@oe.utils.conditional('KERNEL_IMAGETYPE', 'vmlinux', ' ${KERNEL_PACKAGE_NAME}-vmlinux (= ${EXTENDPKGV})', '', d)}"
+RDEPENDS:${KERNEL_PACKAGE_NAME}-vmlinux:append = "${@oe.utils.conditional('KERNEL_IMAGETYPE', 'vmlinux', ' ${KERNEL_PACKAGE_NAME} (= ${EXTENDPKGV})', '', d)}"
+RDEPENDS:${KERNEL_PACKAGE_NAME}-modules:append = " ${KERNEL_PACKAGE_NAME} (= ${EXTENDPKGV})"
 PKG:${KERNEL_PACKAGE_NAME}-base = "${KERNEL_PACKAGE_NAME}-${@legitimize_package_name(d.getVar('KERNEL_VERSION'))}"
 RPROVIDES:${KERNEL_PACKAGE_NAME}-base += "${KERNEL_PACKAGE_NAME}-${KERNEL_VERSION}"
 ALLOW_EMPTY:${KERNEL_PACKAGE_NAME} = "1"
Signature · 1 line
2.31.1
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw

Re: [OE-core] [PATCH v3 1/2] kernel, kernel-module-split: Add runtime dependency to subpackages on main package

Quoted 43 lines · Alexandre Belloni

Hello,

Quoted 23 lines · Zoltan Boszormenyi via lists.openembedded.org

From: Zoltán Böszörményi <[email protected]>

This creates a circular dependency between the main kernel package and its subpackages. It helps package managers to automatically remove all kernel packages of the same version when upgrading.

---
v2: No changes

v3: Add reverse RDEPENDS to subpackages unconditionally
Handle KERNEL_SPLIT_MODULES=1 (default) case in meta/classes/kernel-module-split.bbclass

  meta/classes/kernel-module-split.bbclass | 5 +++--
  meta/classes/kernel.bbclass              | 7 ++++++-
  2 files changed, 9 insertions(+), 3 deletions(-)
meta/classes/kernel-module-split.bbclass +0 -0
index a29c294810..2ddcea538c 100644

meta/classes/kernel-module-split.bbclass python split_kernel_module_packages () { · line 182

Quoted 9 lines
meta/classes/kernel-module-split.bbclass +3 -2
@@ -176,8 +176,9 @@ python split_kernel_module_packages () {
      module_pattern = module_pattern_prefix + kernel_package_name + '-module-%s' + module_pattern_suffix
 
      modules = do_split_packages(d, root='${nonarch_base_libdir}/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='%s-%s' % (kernel_package_name, kernel_version))
-    if modules:
-        d.appendVar('RDEPENDS:' + metapkg, ' '+' '.join(modules))
+    for mod in modules:
+        d.appendVar('RDEPENDS:' + metapkg, ' %s (= ${EXTENDPKGV})' % mod)
+        d.appendVar('RDEPENDS:' + mod, ' %s (= ${EXTENDPKGV})' % kernel_package_name)
 

I believe this causes the following issues:

https://autobuilder.yoctoproject.org/typhoon/#/builders/72/builds/4135/steps/18/logs/stdio

Error:
Problem: package hello-mod-0.1-r0.qemux86_64 requires kernel-module-hello-5.14.6-yocto-standard = 0.1-r0, but none of the providers can be installed

Quoted 8 lines

https://autobuilder.yoctoproject.org/typhoon/#/builders/82/builds/2342/steps/11/logs/stdio

Error:
Problem: package lttng-tools-ptest-2.13.0-r0.cortexa57 requires lttng-modules, but none of the providers can be installed
- package lttng-modules-2.13.0-r0.qemuarm64 requires kernel-module-lttng-wrapper-5.14.6-yocto-standard = 2.13.0-r0, but none of the providers can be installed
- conflicting requests
- nothing provides kernel = 2.13.0-r0 needed by kernel-module-lttng-wrapper-5.14.6-yocto-standard-2.13.0-r0.qemuarm64
(try to add '--skip-broken' to skip uninstallable packages)

Arrggh. Externally built modules?

That exact ${EXTENDPKGV} match was intended only for the kernel and its own modules.

An extra opt-out knob should be devised to be used by such individual module recipes because their full version may not match the kernel's.

Quoted 44 lines
Quoted 38 lines
meta/classes/kernel-module-split.bbclass +0 -0
      # If modules-load.d and modprobe.d are empty at this point, remove them to
      # avoid warnings. removedirs only raises an OSError if an empty
meta/classes/kernel.bbclass +6 -1
index 4acec1877e..afd9f8045e 100644
@@ -98,7 +98,9 @@ python __anonymous () {
          typelower = type.lower()
          d.appendVar('PACKAGES', ' %s-image-%s' % (kname, typelower))
          d.setVar('FILES:' + kname + '-image-' + typelower, '/' + imagedest + '/' + type + '-${KERNEL_VERSION_NAME}' + ' /' + imagedest + '/' + type)
+        d.appendVar('RDEPENDS:%s-image' % kname, ' %s (= ${EXTENDPKGV})' % kname)
          d.appendVar('RDEPENDS:%s-image' % kname, ' %s-image-%s (= ${EXTENDPKGV})' % (kname, typelower))
+        d.appendVar('RDEPENDS:%s-image-%s' % (kname, typelower), ' %s (= ${EXTENDPKGV})' % kname)
          splitmods = d.getVar("KERNEL_SPLIT_MODULES")
          if splitmods != '1':
              d.appendVar('RDEPENDS:%s-image' % kname, ' %s-modules (= ${EXTENDPKGV})' % kname)
@@ -627,8 +629,11 @@ 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
  RDEPENDS:${KERNEL_PACKAGE_NAME}-base ?= "${KERNEL_PACKAGE_NAME}-image (= ${EXTENDPKGV})"
+RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append = " ${KERNEL_PACKAGE_NAME} (= ${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)}"
+RDEPENDS:${KERNEL_PACKAGE_NAME}-image:append = "${@oe.utils.conditional('KERNEL_IMAGETYPE', 'vmlinux', ' ${KERNEL_PACKAGE_NAME}-vmlinux (= ${EXTENDPKGV})', '', d)}"
+RDEPENDS:${KERNEL_PACKAGE_NAME}-vmlinux:append = "${@oe.utils.conditional('KERNEL_IMAGETYPE', 'vmlinux', ' ${KERNEL_PACKAGE_NAME} (= ${EXTENDPKGV})', '', d)}"
+RDEPENDS:${KERNEL_PACKAGE_NAME}-modules:append = " ${KERNEL_PACKAGE_NAME} (= ${EXTENDPKGV})"
  PKG:${KERNEL_PACKAGE_NAME}-base = "${KERNEL_PACKAGE_NAME}-${@legitimize_package_name(d.getVar('KERNEL_VERSION'))}"
  RPROVIDES:${KERNEL_PACKAGE_NAME}-base += "${KERNEL_PACKAGE_NAME}-${KERNEL_VERSION}"
  ALLOW_EMPTY:${KERNEL_PACKAGE_NAME} = "1"
Signature · 1 line
2.31.1