]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel-yocto: fix diffconfig/kernel_configme breakage
authorChristopher Larson <kergoth@gmail.com>
Thu, 6 Mar 2014 18:10:43 +0000 (11:10 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 7 Mar 2014 14:44:25 +0000 (14:44 +0000)
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@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/kernel-yocto.bbclass

index 7913dd8c00583f3f5cf3cc1952e968132102fcf3..707a219f6587b4c9d8935272bcaa38be25d99dfc 100644 (file)
@@ -263,6 +263,8 @@ do_kernel_configme() {
        echo "CONFIG_LOCALVERSION="\"${LINUX_VERSION_EXTENSION}\" >> ${B}/.config
 }
 
+addtask kernel_configme after do_patch
+
 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)
+}