[PATCH] kas: add BB_HASHSERVE_DB_DIR to allowed environment variables

1 view
Skip to first unread message

Ross Burton

unread,
Mar 24, 2026, 12:06:02 PM (yesterday) Mar 24
to kas-...@googlegroups.com
Kas allows SSTATE_DIR to be set via an environment variable, but the
latest oe-core will now warn if hashequiv has been enabled[1], the
sstate is outside the build tree, but the hashequiv database is inside
the build tree. This is because the hashequiv data is needed to make
full use of the sstate objects.

The solution here is to also set the hashserver database location, but
this can't be done in the same way as SSTATE_DIR as we can't set it as
an environment variable. Add BB_HASHSERVE_DB_DIR to the list of
variables that can be set in the environment so that callers can set
them both if needed.

[1] oe-core 491de0db64a ("sanity.bbclass: warn when sstate is outside of
build dir, but hash equiv database is inside it")

Signed-off-by: Ross Burton <ross....@arm.com>
---
kas/libkas.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kas/libkas.py b/kas/libkas.py
index 5b4837d..f375a3a 100644
--- a/kas/libkas.py
+++ b/kas/libkas.py
@@ -499,7 +499,7 @@ def get_build_environ(build_system):

conf_env = get_context().config.get_environment()

- env_vars = ['SSTATE_DIR', 'SSTATE_MIRRORS', 'DL_DIR', 'TMPDIR']
+ env_vars = ['SSTATE_DIR', 'SSTATE_MIRRORS', 'BB_HASHSERVE_DB_DIR', 'DL_DIR', 'TMPDIR']
env_vars.extend(conf_env)

env.update(conf_env)
--
2.43.0

MOESSBAUER, Felix

unread,
5:42 AM (9 hours ago) 5:42 AM
to kas-...@googlegroups.com, ross....@arm.com
Thanks!

I guess we need the same change for the kas-container script as well
[2].

Example:
[2]
https://github.com/siemens/kas/blob/226e890f078aa5c72f3b72e0f40a9d29902f6645/kas-container#L632

Felix

> env_vars.extend(conf_env)
>
> env.update(conf_env)
> --
> 2.43.0
>
> --
> You received this message because you are subscribed to the Google Groups "kas-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to kas-devel+...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/kas-devel/20260324160554.467797-1-ross.burton%40arm.com.

--
Siemens AG
Linux Expert Center
Friedrich-Ludwig-Bauer-Str. 3
85748 Garching, Germany

Reply all
Reply to author
Forward
0 new messages