From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Alexander Kanavin <alex.kanavin@gmail.com>,
Yocto-mailing-list <yocto@lists.yoctoproject.org>
Cc: ",openembedded-core@lists.openembedded.org"
<openembedded-core@lists.openembedded.org>,
Joshua Watt <jpewhacker@gmail.com>
Subject: Re: sharing sstate in bitbake-setup
Date: Wed, 26 Nov 2025 16:41:48 +0000 [thread overview]
Message-ID: <7cefc9025cec54cc835cd3b065aa653f95a38634.camel@linuxfoundation.org> (raw)
In-Reply-To: <CANNYZj_QRWSTZMne1B0PO8rdo19Ltb=QqQGVmSRk7ZpnaY2MAQ@mail.gmail.com>
On Wed, 2025-11-26 at 17:13 +0100, Alexander Kanavin wrote:
> On Tue, 25 Nov 2025 at 14:54, Alexander Kanavin via
> lists.yoctoproject.org <alex.kanavin=gmail.com@lists.yoctoproject.org>
> wrote:
> > BB_HASHSERVE_SHARED_DB = "/path/to/common/hashserv.db"
> >
> > bitbake-setup would put this (and SSTATE_DIR) into site.conf that is
> > symlinked into every build.
>
> I quickly hacked bitbake's cooker.py to try this out:
>
> - dbfile = (self.data.getVar("PERSISTENT_DIR") or
> self.data.getVar("CACHE")) + "/hashserv.db"
> + dbfile = "/home/alex" + "/hashserv.db"
>
>
> And then made two build directories with shared SSTATE_DIR.
>
> TL;DR: everything ran smoothly and as expected.
>
> I ran overlapping builds, added no-ops to gnu-config recipe to 'force'
> hash equivalency, and there were no errors or crashes, and sstate was
> reused as expected.
>
> So I think we should do it like this, subject to 'shared-sstate'
> setting in bitbake-setup, on by default.
PERSISTENT_DIR is *not* designed to be shared between builds. it might
happen to work but is a really bad idea. Personally, I think those
cache directory variables and cache layout need redesigning so we
should probably take the opportunity to do that.
Cheers,
Richard
next prev parent reply other threads:[~2025-11-26 16:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-18 15:55 Yocto Project Status 18 November 2025 (WW46) Stephen K Jolley
2025-11-18 16:56 ` [OE-core] " Alexander Kanavin
2025-11-25 13:54 ` Alexander Kanavin
[not found] ` <187B446507D0D6B0.100836@lists.yoctoproject.org>
2025-11-26 16:13 ` sharing sstate in bitbake-setup Alexander Kanavin
2025-11-26 16:41 ` Richard Purdie [this message]
2025-11-26 16:53 ` Alexander Kanavin
2025-12-06 3:31 ` [OE-core] " Daniel Chaves
2025-12-06 8:40 ` Alexander Kanavin
-- strict thread matches above, loose matches on Subject: below --
2025-12-06 2:29 Daniel Chaves
2025-12-06 2:47 Daniel Chaves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7cefc9025cec54cc835cd3b065aa653f95a38634.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=alex.kanavin@gmail.com \
--cc=jpewhacker@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=yocto@lists.yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.