ci: persist the hash equivalence database

BB_HASHSERVE defaults to "auto", which stores hashserv.db in the build
directory. CI builds in a temporary build directory, so the database was
discarded after every job and equivalent outputs from previous builds were
never matched.

Store it in SSTATE_DIR, next to the artifacts it references. This also aligns
to bitbake-setup default behaviour.

Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
This commit is contained in:
Andrei Gherzan committed 2026-10-19 04:47:46 +01:00
1 parent df3c09e34c
commit 651a6a21ed
1 file changed
+3
@@ -39,6 +39,9 @@ done
# Build configuration
printf "\n# ------ ci ------\n" >> conf/local.conf
[ -z "$SSTATE_DIR" ] || echo SSTATE_DIR = \""$SSTATE_DIR"\" >> conf/local.conf
# Keep the hash equivalence database next to the sstate it describes so it
# persists across builds. This matches the bitbake-setup default.
[ -z "$SSTATE_DIR" ] || echo BB_HASHSERVE_DB_DIR = \""$SSTATE_DIR"\" >> conf/local.conf
[ -z "$DL_DIR" ] || echo DL_DIR = \""$DL_DIR"\" >> conf/local.conf
[ -z "$DISTRO" ] || echo DISTRO = \""$DISTRO"\" >> conf/local.conf
cat <<EOCONF >>conf/local.conf