]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
populate_sdk_ext: Fix race condition on bb_unihashes.dat
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 1 Jun 2022 18:17:42 +0000 (19:17 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 2 Jun 2022 11:28:17 +0000 (12:28 +0100)
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/populate_sdk_ext.bbclass
meta/conf/sanity.conf

index e2019f9bbf7b0b5b5857ff7f51fde9e9281f4672..3ddbb46eda44ae49702dc34af403f7e920da02db 100644 (file)
@@ -401,10 +401,9 @@ python copy_buildsystem () {
             if os.path.exists(builddir + dest_stub):
                 shutil.copyfile(builddir + dest_stub, baseoutpath + dest_stub)
 
-    if os.path.exists(builddir + '/cache/bb_unihashes.dat'):
-        bb.parse.siggen.save_unitaskhashes()
-        bb.utils.mkdirhier(os.path.join(baseoutpath, 'cache'))
-        shutil.copyfile(builddir + '/cache/bb_unihashes.dat', baseoutpath + '/cache/bb_unihashes.dat')
+    cachedir = os.path.join(baseoutpath, 'cache')
+    bb.utils.mkdirhier(cachedir)
+    bb.parse.siggen.copy_unitaskhashes(cachedir)
 
     # If PR Service is in use, we need to export this as well
     bb.note('Do we have a pr database?')
index e6cb2b45fe2114bd6788603a0f2faadd26e9ffff..fff1ad8246b933958d8861b806b120ec9e5ac70d 100644 (file)
@@ -3,7 +3,7 @@
 # See sanity.bbclass
 #
 # Expert users can confirm their sanity with "touch conf/sanity.conf"
-BB_MIN_VERSION = "1.53.1"
+BB_MIN_VERSION = "2.0.1"
 
 SANITY_ABIFILE = "${TMPDIR}/abi_version"