summaryrefslogtreecommitdiffstats
path: root/meta/classes/package.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-08-15 20:55:16 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-08-21 14:29:02 (GMT)
commit95c604953d054a688d3a30b303c9025094e65f84 (patch)
treef68b61fa441f657d4c0ea0687172d23cf153446a /meta/classes/package.bbclass
parentd67fbf68f6923431e6c825cc92e0059d7dc901fb (diff)
downloadpoky-95c604953d054a688d3a30b303c9025094e65f84.tar.gz
package: Fix race between do_package and do_packagedata
do_package has PKGDESTWORK as a cleandir and do_packagedata has it as an sstate-input dir. This means do_package wipes out the directory at both do_package and do_package_setscene. do_package_setscene and do_packagedata_setscene can run in parallel when installing from sstate which means they can wipe out parts of each other leading to interesting build failures. We therefore have to add in a hardlink copy so that the directories can work independently of each other. (From OE-Core rev: 692b2046bb60806ee6bbde6ba15bd1637b00efb1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r--meta/classes/package.bbclass10
1 files changed, 7 insertions, 3 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index e67bb5b..114d655 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -2252,14 +2252,18 @@ python do_package_setscene () {
2252} 2252}
2253addtask do_package_setscene 2253addtask do_package_setscene
2254 2254
2255do_packagedata () { 2255# Copy from PKGDESTWORK to tempdirectory as tempdirectory can be cleaned at both
2256 : 2256# do_package_setscene and do_packagedata_setscene leading to races
2257python do_packagedata () {
2258 src = d.expand("${PKGDESTWORK}")
2259 dest = d.expand("${WORKDIR}/pkgdata-pdata-input")
2260 oe.path.copyhardlinktree(src, dest)
2257} 2261}
2258 2262
2259addtask packagedata before do_build after do_package 2263addtask packagedata before do_build after do_package
2260 2264
2261SSTATETASKS += "do_packagedata" 2265SSTATETASKS += "do_packagedata"
2262do_packagedata[sstate-inputdirs] = "${PKGDESTWORK}" 2266do_packagedata[sstate-inputdirs] = "${WORKDIR}/pkgdata-pdata-input"
2263do_packagedata[sstate-outputdirs] = "${PKGDATA_DIR}" 2267do_packagedata[sstate-outputdirs] = "${PKGDATA_DIR}"
2264do_packagedata[stamp-extra-info] = "${MACHINE_ARCH}" 2268do_packagedata[stamp-extra-info] = "${MACHINE_ARCH}"
2265 2269