]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
multilib_global.bbclass: fix parsing error with no kernel module split
authorChen Qi <Qi.Chen@windriver.com>
Mon, 5 Feb 2024 07:20:01 +0000 (15:20 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 6 Feb 2024 10:31:25 +0000 (10:31 +0000)
commit43dd497bc161ac44faecfdff052db03679dbb4f8
tree2c2f7956a5335eecee9d03a4767752688307fcd8
parentb996184a13abf1e38b9cee5ed0fd008b07999bd8
multilib_global.bbclass: fix parsing error with no kernel module split

The problem could be reproduced with the following settings:
MACHINE = "qemux86-64"
KERNEL_SPLIT_MODULES = "0"
require conf/multilib.conf
MULTILIBS ?= "multilib:lib32"
DEFAULTTUNE:virtclass-multilib-lib32 ?= "core2-32"

The error message is as below:
  bb.data_smart.ExpansionError: Failure expanding variable KERNEL_VERSION_PKG_NAME, expression was ${@legitimize_package_name(d.getVar('KERNEL_VERSION'))} which triggered exception TypeError: expected string or bytes-like object
  The variable dependency chain for the failure is: KERNEL_VERSION_PKG_NAME -> RPROVIDES:kernel-modules

This is because multilib_virtclass_handler_global function in
multilib_global.bbclass deletes KERNEL_VERSION. So we need to handle
such situation. We'll also need to delete KERNEL_VERSION_PKG_NAME
to avoid this parsing error.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/multilib_global.bbclass