On Fri, 2025-01-10 at 03:08 +0000, Daniel via lists.yoctoproject.org wrote:
> Kernel packages may not always use the kernel-module- prefix. However,
> those listed in DEPENDS will consistently add Module.symvers to the
> STAGING_INCDIR.
> 
> Signed-off-by: Daniel Chaves <dchv...@gmail.com>
> ---
>  meta/classes-recipe/module.bbclass | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/meta/classes-recipe/module.bbclass 
> b/meta/classes-recipe/module.bbclass
> index f2f0b25a2d..0f16522866 100644
> --- a/meta/classes-recipe/module.bbclass
> +++ b/meta/classes-recipe/module.bbclass
> @@ -11,13 +11,13 @@ EXTRA_OEMAKE += "KERNEL_SRC=${STAGING_KERNEL_DIR}"
>  MODULES_INSTALL_TARGET ?= "modules_install"
>  MODULES_MODULE_SYMVERS_LOCATION ?= ""
>  
> -python __anonymous () {
> -    depends = d.getVar('DEPENDS')
> -    extra_symbols = []
> -    for dep in depends.split():
> -        if dep.startswith("kernel-module-"):
> -            extra_symbols.append("${STAGING_INCDIR}/" + dep + 
> "/Module.symvers")
> -    d.setVar('KBUILD_EXTRA_SYMBOLS', " ".join(extra_symbols))
> +python () {
> +    import glob
> +
> +    extra_symbols = glob.glob(d.getVar('STAGING_INCDIR') + 
> "/*/Module.symvers")
> +
> +    d.setVar('KBUILD_EXTRA_SYMBOLS', d.getVar('KBUILD_EXTRA_SYMBOLS') + " " 
> + \
> +        " ".join(extra_symbols))
>  }
>  
>  python do_package:prepend () {

This is going to lead to non-determinism since STAGING_INCDIR may or
may not exist (e.g. at parsing time before the build) and the value
will therefore change.

If we really want/need to do that I'd at least expect an explanation of
why the changes don't matter and how they don't affect task checksums.

As Alexandre mentions, this also needs to be submitted to the OE-Core
list.

Cheers,

Richard



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

Reply via email to