]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
kernel-yocto: Simplify code for cleanliness and slight performance
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 29 Jul 2026 21:57:54 +0000 (22:57 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 3 Aug 2026 17:04:08 +0000 (18:04 +0100)
Checking "in d" is really slow, using getVar for a specific lookup
is much much faster.

The externalsrc issue can be resolved more simply by adding an extra
constraint on the kernel_configme task.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/kernel-yocto.bbclass

index 78a4a7ade74ed70ad4e91fdb4e078e6de7232259..5464aa111582b727e7152f50a7576d84f46b22b2 100644 (file)
@@ -513,7 +513,7 @@ do_kernel_configme() {
        fi
 }
 
-addtask kernel_configme before do_configure after do_patch
+addtask kernel_configme before do_configure after do_patch do_unpack
 addtask config_analysis
 
 do_config_analysis[depends] = "virtual/kernel:do_configure"
@@ -770,14 +770,8 @@ KBUILD_OUTPUT = "${B}"
 
 python () {
     # If diffconfig is available, ensure it runs after kernel_configme
-    if 'do_diffconfig' in d:
+    if d.getVar('do_diffconfig', False):
         bb.build.addtask('do_diffconfig', None, 'do_kernel_configme', d)
-
-    externalsrc = d.getVar('EXTERNALSRC')
-    if externalsrc:
-        # If we deltask do_patch, do_kernel_configme is left without
-        # dependencies and runs too early
-        d.setVarFlag('do_kernel_configme', 'deps', (d.getVarFlag('do_kernel_configme', 'deps', False) or []) + ['do_unpack'])
 }
 
 # extra tasks