]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel-yocto.bbclass: Fix deps when externalsrc is used
authorPaul Barker <pbarker@konsulko.com>
Wed, 8 Apr 2020 15:14:55 +0000 (16:14 +0100)
committerSteve Sakoman <steve@sakoman.com>
Thu, 30 Apr 2020 21:59:59 +0000 (11:59 -1000)
do_kernel_configme was recently removed from SRCTREECOVEREDTASKS so this
task still runs when externalsrc is used. This task normally runs after
do_patch but when externalsrc is used, do_patch is removed and this ordering
restriction does nothing. This allows bitbake to execute do_kernel_configme
too early, causing races with do_unpack.

This is fixed by adding in a dependency on do_unpack when externalsrc is
used.

Signed-off-by: Paul Barker <pbarker@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/classes/kernel-yocto.bbclass

index 6792c9a2339002fc4365fe2dc471c6176a0cf9ee..5bc627066edbb7de77490d817365bf08520d6f8b 100644 (file)
@@ -489,6 +489,12 @@ 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)
+
+    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