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 <[email protected]>
---

v2 - ensure mkdir is present

 meta/classes/populate_sdk_ext.bbclass | 7 +++----
 meta/conf/sanity.conf                 | 2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/meta/classes/populate_sdk_ext.bbclass 
b/meta/classes/populate_sdk_ext.bbclass
index e2019f9bbf7..3ddbb46eda4 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -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?')
diff --git a/meta/conf/sanity.conf b/meta/conf/sanity.conf
index e6cb2b45fe2..fff1ad8246b 100644
--- a/meta/conf/sanity.conf
+++ b/meta/conf/sanity.conf
@@ -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"
 
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#166467): 
https://lists.openembedded.org/g/openembedded-core/message/166467
Mute This Topic: https://lists.openembedded.org/mt/91496083/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to