diff options
author | Jose Quaresma <quaresma.jose@gmail.com> | 2022-06-14 17:24:38 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-06-15 12:27:01 +0100 |
commit | 0b17d4493548bd4ec3c79364721be926bcaea244 (patch) | |
tree | 826ceb7ab2d4f0db490f81c764ebeec1cf837ea7 | |
parent | 11d5f2ce25152c1d9023c274f63038fd74314d80 (diff) | |
download | poky-0b17d4493548bd4ec3c79364721be926bcaea244.tar.gz |
archiver: don't use machine variables in shared recipes
When using multiconfig with the same TMP folder we can have
races because the shared recipes like gcc-source run twice.
ARCHIVER_OUTDIR = ${ARCHIVER_TOPDIR}/${TARGET_SYS}/${PF}/
which includes TARGET_SYS and between the two different MACHINE values,
this changes from 'arm-poky-linux-gnueabi' to 'aarch64-poky-linux'.
This leads to the task running twice, once for each multiconfig.
To solve this we need to store the shared output in a common place
for all machines and in this way the stamps will be the same for each
machine so the gcc-source will on run once regardless of the machine used.
(From OE-Core rev: 5abe497aad39a6ce8d72556fcdda1938a0f8c1bc)
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>
-rw-r--r-- | meta/classes/archiver.bbclass | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass index 8d026067f4..33070cd17f 100644 --- a/meta/classes/archiver.bbclass +++ b/meta/classes/archiver.bbclass | |||
@@ -55,9 +55,10 @@ ARCHIVER_MODE[compression] ?= "xz" | |||
55 | 55 | ||
56 | DEPLOY_DIR_SRC ?= "${DEPLOY_DIR}/sources" | 56 | DEPLOY_DIR_SRC ?= "${DEPLOY_DIR}/sources" |
57 | ARCHIVER_TOPDIR ?= "${WORKDIR}/archiver-sources" | 57 | ARCHIVER_TOPDIR ?= "${WORKDIR}/archiver-sources" |
58 | ARCHIVER_OUTDIR = "${ARCHIVER_TOPDIR}/${TARGET_SYS}/${PF}/" | 58 | ARCHIVER_ARCH = "${TARGET_SYS}" |
59 | ARCHIVER_OUTDIR = "${ARCHIVER_TOPDIR}/${ARCHIVER_ARCH}/${PF}/" | ||
59 | ARCHIVER_RPMTOPDIR ?= "${WORKDIR}/deploy-sources-rpm" | 60 | ARCHIVER_RPMTOPDIR ?= "${WORKDIR}/deploy-sources-rpm" |
60 | ARCHIVER_RPMOUTDIR = "${ARCHIVER_RPMTOPDIR}/${TARGET_SYS}/${PF}/" | 61 | ARCHIVER_RPMOUTDIR = "${ARCHIVER_RPMTOPDIR}/${ARCHIVER_ARCH}/${PF}/" |
61 | ARCHIVER_WORKDIR = "${WORKDIR}/archiver-work/" | 62 | ARCHIVER_WORKDIR = "${WORKDIR}/archiver-work/" |
62 | 63 | ||
63 | # When producing a combined mirror directory, allow duplicates for the case | 64 | # When producing a combined mirror directory, allow duplicates for the case |
@@ -101,6 +102,10 @@ python () { | |||
101 | bb.debug(1, 'archiver: %s is excluded, covered by gcc-source' % pn) | 102 | bb.debug(1, 'archiver: %s is excluded, covered by gcc-source' % pn) |
102 | return | 103 | return |
103 | 104 | ||
105 | # TARGET_SYS in ARCHIVER_ARCH will break the stamp for gcc-source in multiconfig | ||
106 | if pn.startswith('gcc-source'): | ||
107 | d.setVar('ARCHIVER_ARCH', "allarch") | ||
108 | |||
104 | def hasTask(task): | 109 | def hasTask(task): |
105 | return bool(d.getVarFlag(task, "task", False)) and not bool(d.getVarFlag(task, "noexec", False)) | 110 | return bool(d.getVarFlag(task, "task", False)) and not bool(d.getVarFlag(task, "noexec", False)) |
106 | 111 | ||