]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel.bbclass: run do_symlink_kernsrc before do_patch
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Tue, 25 Aug 2020 14:35:15 +0000 (16:35 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 26 Aug 2020 08:03:59 +0000 (09:03 +0100)
There's a race between do_symlink_kernsrc and do_populate_lic, since
the latter is ordered "after do_patch"; so the two may run in
parallel. In some cases, that actually causes do_populate_lic to fail
if it happens to look for a license file somewhere under ${S} in the
short window after shutil.move and before the symlink has been
created.

Fix that by simply ordering symlink_kernsrc before do_patch. Any task
that pokes around in ${S} looking for files should be ordered after
do_patch, so this should also fix similar latent races with other ad
hoc tasks.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/kernel.bbclass

index e2ceb6a333bb25265b6c9ab197b4703dfffe9159..cba77daa7a02d59d4ec9155d1106f6cd62ede9ff 100644 (file)
@@ -172,7 +172,7 @@ python do_symlink_kernsrc () {
             shutil.move(s, kernsrc)
             os.symlink(kernsrc, s)
 }
-addtask symlink_kernsrc before do_configure after do_unpack
+addtask symlink_kernsrc before do_patch after do_unpack
 
 inherit kernel-arch deploy