diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-08-15 21:55:16 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-08-21 15:29:02 +0100 |
| commit | 95c604953d054a688d3a30b303c9025094e65f84 (patch) | |
| tree | f68b61fa441f657d4c0ea0687172d23cf153446a /meta/classes/package.bbclass | |
| parent | d67fbf68f6923431e6c825cc92e0059d7dc901fb (diff) | |
| download | poky-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.bbclass | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index e67bb5bd97..114d6559f5 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
| @@ -2252,14 +2252,18 @@ python do_package_setscene () { | |||
| 2252 | } | 2252 | } |
| 2253 | addtask do_package_setscene | 2253 | addtask do_package_setscene |
| 2254 | 2254 | ||
| 2255 | do_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 |
| 2257 | python 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 | ||
| 2259 | addtask packagedata before do_build after do_package | 2263 | addtask packagedata before do_build after do_package |
| 2260 | 2264 | ||
| 2261 | SSTATETASKS += "do_packagedata" | 2265 | SSTATETASKS += "do_packagedata" |
| 2262 | do_packagedata[sstate-inputdirs] = "${PKGDESTWORK}" | 2266 | do_packagedata[sstate-inputdirs] = "${WORKDIR}/pkgdata-pdata-input" |
| 2263 | do_packagedata[sstate-outputdirs] = "${PKGDATA_DIR}" | 2267 | do_packagedata[sstate-outputdirs] = "${PKGDATA_DIR}" |
| 2264 | do_packagedata[stamp-extra-info] = "${MACHINE_ARCH}" | 2268 | do_packagedata[stamp-extra-info] = "${MACHINE_ARCH}" |
| 2265 | 2269 | ||
