1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-02 01:19:52 +00:00

sstatesig/populate_sdk_ext: Improve unihash cache handling

Copying in the bb_unihashes cache file was at best a hack and creates a number of
challenges. One is staying in sync with bitbake since it may not have saved the
most recent version of the file. A second is a determinism problem since there may
be more entries in the file than the SDK should have had access to.

To improve the situation, add code to write the data into the locked-sigs.inc file
such that even when locked-sigs aren't used, the right hash mappings are injected
by the get_cached_unihash call.

The functions in copy_buildsystem need to be updated to preserve data they're not
editting.

(From OE-Core rev: 11373def3171e75b3b74ef694da213dd21f3064c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2024-05-23 17:17:30 +01:00
parent 56c578f664
commit 652e3028d9
3 changed files with 40 additions and 11 deletions
@@ -413,10 +413,6 @@ def write_local_conf(d, baseoutpath, derivative, core_meta_subdir, uninative_che
if os.path.exists(builddir + dest_stub):
shutil.copyfile(builddir + dest_stub, baseoutpath + dest_stub)
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?')
if d.getVar("PRSERV_HOST"):
@@ -507,10 +503,6 @@ def prepare_locked_cache(d, baseoutpath, derivative, conf_initpath):
else:
tasklistfn = None
cachedir = os.path.join(baseoutpath, 'cache')
bb.utils.mkdirhier(cachedir)
bb.parse.siggen.copy_unitaskhashes(cachedir)
# Add packagedata if enabled
if d.getVar('SDK_INCLUDE_PKGDATA') == '1':
lockedsigs_base = d.getVar('WORKDIR') + '/locked-sigs-base.inc'