diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-06-01 19:17:42 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-06-02 12:28:21 +0100 |
commit | 35509661a7e38e618abeeed0bfb5516e2607efb6 (patch) | |
tree | 78ff77784b61ce2e22d1bacac1f608df104ffa91 /meta/classes/populate_sdk_ext.bbclass | |
parent | 7bec81151bdd0b23a7497ce71d1cf1c1560b36f5 (diff) | |
download | poky-35509661a7e38e618abeeed0bfb5516e2607efb6.tar.gz |
populate_sdk_ext: Fix race condition on bb_unihashes.dat
There is a race were the bb_unihashes.dat file may end up zero sized due to
concurrent builds. Use recently added API within bitbake to copy the file
safely. Also use the opportunity to remove hardcoded filepaths internal to
bitbake from OE-Core.
Bump the minimum bitbake version to match the API being used.
(From OE-Core rev: 106a7e07057e4681e6fb06dfe9e28d2e183d667d)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/populate_sdk_ext.bbclass')
-rw-r--r-- | meta/classes/populate_sdk_ext.bbclass | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass index e2019f9bbf..3ddbb46eda 100644 --- a/meta/classes/populate_sdk_ext.bbclass +++ b/meta/classes/populate_sdk_ext.bbclass | |||
@@ -401,10 +401,9 @@ python copy_buildsystem () { | |||
401 | if os.path.exists(builddir + dest_stub): | 401 | if os.path.exists(builddir + dest_stub): |
402 | shutil.copyfile(builddir + dest_stub, baseoutpath + dest_stub) | 402 | shutil.copyfile(builddir + dest_stub, baseoutpath + dest_stub) |
403 | 403 | ||
404 | if os.path.exists(builddir + '/cache/bb_unihashes.dat'): | 404 | cachedir = os.path.join(baseoutpath, 'cache') |
405 | bb.parse.siggen.save_unitaskhashes() | 405 | bb.utils.mkdirhier(cachedir) |
406 | bb.utils.mkdirhier(os.path.join(baseoutpath, 'cache')) | 406 | bb.parse.siggen.copy_unitaskhashes(cachedir) |
407 | shutil.copyfile(builddir + '/cache/bb_unihashes.dat', baseoutpath + '/cache/bb_unihashes.dat') | ||
408 | 407 | ||
409 | # If PR Service is in use, we need to export this as well | 408 | # If PR Service is in use, we need to export this as well |
410 | bb.note('Do we have a pr database?') | 409 | bb.note('Do we have a pr database?') |