summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Quaresma <quaresma.jose@gmail.com>2022-07-22 13:31:24 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-28 07:51:30 +0100
commit20ebf63217633871e1578c4ec7a72040745e6a62 (patch)
treeaf733a9c43bceb55ff37e6a4f1aaf0a91343cc56
parent6cde70a085799e547034886563b518a093df5614 (diff)
downloadpoky-20ebf63217633871e1578c4ec7a72040745e6a62.tar.gz
archiver.bbclass: some recipes that uses the kernelsrc bbclass uses the shared source
This fix a race that happens when building some of the followning recipes with kernel at same time. The kernelsrc uses the kernel shared source dir as their source S = "${STAGING_KERNEL_DIR}" and this will cause a race in the do_unpack_and_patch task, when bitbake runs the bb.build.exec_func('do_unpack', d) because do_unpack will clean the source dir on startup. | ok: note that S != "${STAGING_KERNEL_DIR} for this ones openembedded-core/meta/recipes-kernel/perf/perf.bb:inherit kernelsrc meta-openembedded/meta-oe/recipes-kernel/usbip-tools/usbip-tools.bb:inherit kernelsrc autotools-brokensep | broken meta-openembedded/meta-oe/recipes-kernel/cpupower/cpupower.bb:inherit kernelsrc kernel-arch bash-completion meta-openembedded/meta-oe/recipes-kernel/spidev-test/spidev-test.bb:inherit bash-completion kernelsrc kernel-arch meta-openembedded/meta-oe/recipes-kernel/intel-speed-select/intel-speed-select.bb:inherit kernelsrc meta-openembedded/meta-oe/recipes-kernel/bpftool/bpftool.bb:inherit bash-completion kernelsrc kernel-arch The issue can be replicated with: INHERIT += "archiver" ARCHIVER_MODE[src] = "original" ARCHIVER_MODE[diff] = "1" And: R=<recipe> bitbake -c cleansstate virtual/kernel $R && bitbake $R (From OE-Core rev: 2556d0bd85039d45cc4b0f9b5d7c4ec50fcbb712) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 5487dee2e1237fb57c5e59b2bbbfbcdfc8c97ab6) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/archiver.bbclass4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 5da369d422..dca4271a69 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -459,7 +459,9 @@ def create_diff_gz(d, src_orig, src, ar_outdir):
459 459
460def is_work_shared(d): 460def is_work_shared(d):
461 pn = d.getVar('PN') 461 pn = d.getVar('PN')
462 return bb.data.inherits_class('kernel', d) or pn.startswith('gcc-source') 462 return pn.startswith('gcc-source') or \
463 bb.data.inherits_class('kernel', d) or \
464 (bb.data.inherits_class('kernelsrc', d) and d.getVar('S') == d.getVar('STAGING_KERNEL_DIR'))
463 465
464# Run do_unpack and do_patch 466# Run do_unpack and do_patch
465python do_unpack_and_patch() { 467python do_unpack_and_patch() {