[OE-core] [PATCH] kernel-yocto: fix diffconfig/kernel_configme breakage

Bruce Ashfield bruce.ashfield at gmail.com
Thu Mar 6 18:40:57 UTC 2014


On Thu, Mar 6, 2014 at 1:10 PM, Christopher Larson <kergoth at gmail.com> wrote:
> The bbclass did the following:
>
>     do_diffconfig[depends] += "virtual/kernel:do_kernel_configme"
>
> This clearly introduces a cross-kernel task dependency if the recipe
> inheriting this class isn't the preferred provider of virtual/kernel, which is
> obviously wrong, but further, will break the build if a kernel-yocto based
> kernel is parsed and not skipped, but virtual/kernel refers to
> a non-kernel-yocto recipe, which would not have the do_kernel_configme task.
>
> Work around this by adding the in-recipe task dep programmatically with
> bb.build.addtask when do_diffconfig exists.
>
> Signed-off-by: Christopher Larson <kergoth at gmail.com>
> ---
>  meta/classes/kernel-yocto.bbclass | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
> index fb8e04e..ef9b9d1 100644
> --- a/meta/classes/kernel-yocto.bbclass
> +++ b/meta/classes/kernel-yocto.bbclass
> @@ -263,6 +263,8 @@ do_kernel_configme() {
>         echo "CONFIG_LOCALVERSION="\"${LINUX_VERSION_EXTENSION}\" >> ${B}/.config
>  }
>
> +addtask kernel_configme after do_patch
> +

linux-yocto.inc already has:

addtask kernel_configme before do_configure after do_patch

So we should be able to avoid adding the task to the class, right ? I
suppose the task could move into the class, but it was always a per
recipe include in the past, I just don't want any unintended issues to
happen from the double task add.

>  python do_kernel_configcheck() {
>      import re, string, sys
>
> @@ -407,4 +409,8 @@ OE_TERMINAL_EXPORTS += "GUILT_BASE KBUILD_OUTPUT"
>  GUILT_BASE = "meta"
>  KBUILD_OUTPUT = "${B}"
>
> -do_diffconfig[depends] += "virtual/kernel:do_kernel_configme"
> +python () {
> +    # If diffconfig is available, ensure it runs after kernel_configme
> +    if 'do_diffconfig' in d:
> +        bb.build.addtask('do_diffconfig', None, 'do_kernel_configme', d)
> +}

Thanks for the fixup!

Bruce

> --
> 1.8.3.4
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"



More information about the Openembedded-core mailing list