diff mbox series

bitbake-setup: make DL_DIR in site.conf overridable by env

Message ID 20260320094407.4169544-1-zhangfei.gao@linaro.org
State New
Headers show
Series bitbake-setup: make DL_DIR in site.conf overridable by env | expand

Commit Message

Zhangfei Gao March 20, 2026, 9:44 a.m. UTC
Use '?=' instead of '=' when writing DL_DIR to site.conf, so an
exported DL_DIR can be reused across environments.

This keeps a default value while allowing environment-based cache
configuration in mixed workflows (e.g. container/host).

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
---
 bin/bitbake-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/bin/bitbake-setup b/bin/bitbake-setup
index 53dbb6221..9d08f3a1b 100755
--- a/bin/bitbake-setup
+++ b/bin/bitbake-setup
@@ -947,7 +947,7 @@  def create_siteconf(top_dir, non_interactive, settings):
                     # wiping and rebuilding you can preserve this directory to speed up this part of
                     # subsequent builds. This directory is safe to share between multiple builds on
                     # the same machine too.
-                    DL_DIR = "{dl_dir}"
+                    DL_DIR ?= "{dl_dir}"
                     """.format(
                         dl_dir=settings["default"]["dl-dir"],
                     )