All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 1/2] cooker: use BB_HASHSERVE_DB_DIR for hash server database location
@ 2025-12-15 14:54 Alexander Kanavin
  2025-12-15 14:54 ` [RFC PATCH 2/2] bitbake-setup: share sstate by default between builds Alexander Kanavin
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Kanavin @ 2025-12-15 14:54 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Alexander Kanavin

From: Alexander Kanavin <alex@linutronix.de>

If unset, the existing behavior is preseved.

The use case is sharing the database in bitbake-setup's driven builds
without having to set up/start/stop a common single server shared
between them (this is added to bitbake-setup in the next commit).

Also create the specified directory if it doesn't yet exist.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 lib/bb/cooker.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index fa7747d64..c1281a847 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -328,7 +328,9 @@ class BBCooker:
         if self.data.getVar("BB_HASHSERVE") == "auto":
             # Create a new hash server bound to a unix domain socket
             if not self.hashserv:
-                dbfile = (self.data.getVar("PERSISTENT_DIR") or self.data.getVar("CACHE")) + "/hashserv.db"
+                dbdir = self.data.getVar("BB_HASHSERVE_DB_DIR") or self.data.getVar("PERSISTENT_DIR") or self.data.getVar("CACHE")
+                os.makedirs(dbdir, exist_ok=True)
+                dbfile = dbdir + "/hashserv.db"
                 upstream = self.data.getVar("BB_HASHSERVE_UPSTREAM") or None
                 if upstream:
                     try:
-- 
2.47.3



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-01-12 12:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-15 14:54 [RFC PATCH 1/2] cooker: use BB_HASHSERVE_DB_DIR for hash server database location Alexander Kanavin
2025-12-15 14:54 ` [RFC PATCH 2/2] bitbake-setup: share sstate by default between builds Alexander Kanavin
2025-12-18 19:49   ` [bitbake-devel] " Paul Barker
2025-12-18 22:39     ` Richard Purdie
2026-01-12 12:51       ` Alexander Kanavin
2025-12-19  8:44   ` Antonin Godard
2026-01-12 12:47     ` Alexander Kanavin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.