Skip to contentSkip to conversation

sstate-cache: Ignore ERROR_QA entry for local build

DISCUSSION Joshua Schüler 3 participants 6 messages May 22, 2025

lore
Share & tools
lore
#0 lore raw

Hi,

We use a shared sstate-cache which is populated by our CI pipeline. Our developer machines have read-only access to this cache.
For my local builds, I like to set ERROR_QA:remove = "version-going-backwards" as I'm jumping around git branches a lot. However, this invalidates the shared cache (verified by bitbake-diffsigs). I tried to remedy this with

ERROR_QA:remove = "version-going-backwards" ERROR_QA[vardepvalue] = "${ERROR_QA} version-going-backwards"

But it does not seem to get picked up correctly, the shared cache is still not used. Am I misunderstanding vardepvalue or the parsing order?

Regards
Joshua

#1 lore raw

I'm not sure I understand the issue. bitbake-diffsigs per se won't tell you if something is in the sstate or not, it only tells you how two sstate signatures differ.

If you're building from a source revision that has not been previously built and placed into the cache, then bitbake has to perform a full build.

If you're building from a source revision that is in the cache, then bitbake will take that.

Alex

Quoted 23 lines · Joshua Schüler via lists.yoctoproject.org

Hi,

We use a shared sstate-cache which is populated by our CI pipeline. Our developer machines have read-only access to this cache.
For my local builds, I like to set ERROR_QA:remove = "version-going-backwards" as I'm jumping around git branches a lot. However, this invalidates the shared cache (verified by bitbake-diffsigs). I tried to remedy this with

ERROR_QA:remove = "version-going-backwards" ERROR_QA[vardepvalue] = "${ERROR_QA} version-going-backwards"

But it does not seem to get picked up correctly, the shared cache is still not used. Am I misunderstanding vardepvalue or the parsing order?

Regards
Joshua

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#65391): https://lists.yoctoproject.org/g/yocto/message/65391
Mute This Topic: https://lists.yoctoproject.org/mt/113243676/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw

Hi Alexander,
I think you misunderstood my question. We have CI-servers, which build our images and populate a common sstate-cache mounted via NFS. The same sstate-cache is available read-only via http to our developer machines to help quickly build the images and test new recipes. Recently, I discovered that my developer machine rebuilds the whole image and does not reuse the sstate-cache populated by the CI. Using bitbake-diffsigs I tracked this down to the ERROR_QA variable, which I modify in my local.conf, as I do not need the "version-going-backwards" warning/error (I'm relying on the CI to catch that).

Now I'm trying to get my build to reuse the global sstate-cache despite my changed ERROR_QA variable, for which I tried the following solution:
ERROR_QA:remove = "version-going-backwards"
ERROR_QA[vardepvalue] = "${ERROR_QA} version-going-backwards"
However, this does not seem to do the trick. The question now is: How can I get my local build to reuse the global sstate-cache despite the changed ERROR_QA variable?

- Joshua

#3 lore raw
Quoted 7 lines · Joshua Schüler via Lists.Yoctoproject.Org

I think you misunderstood my question. We have CI-servers, which build our images and populate a common sstate-cache mounted via NFS. The same sstate-cache is available read-only via http to our developer machines to help quickly build the images and test new recipes. Recently, I discovered that my developer machine rebuilds the whole image and does not reuse the sstate-cache populated by the CI. Using bitbake-diffsigs I tracked this down to the ERROR_QA variable, which I modify in my local.conf, as I do not need the "version-going-backwards" warning/error (I'm relying on the CI to catch that).

Now I'm trying to get my build to reuse the global sstate-cache despite my changed ERROR_QA variable, for which I tried the following solution:
ERROR_QA:remove = "version-going-backwards"
ERROR_QA[vardepvalue] = "${ERROR_QA} version-going-backwards"
However, this does not seem to do the trick. The question now is: How can I get my local build to reuse the global sstate-cache despite the changed ERROR_QA variable?

It helps to mention which version of Yocto you're on. I think ERROR_QA changes invalidating sstate used to be an issue, but it was fixed in master around August 2024 with this commit:

lib/oe: Use new visitorcode functionality for qa.handle_error()

Alex

#4 lore raw

Hi Alex,
Sorry, forgot to mention the version. We are on scartgap, which does not seem have this commit yet. Thank you very much for the pointer though. I assume there is no easy workaround for scarthgap.
- Joshua

#5 lore raw
Quoted 7 lines · Joshua Schüler via lists.yoctoproject.org

Hi Alex,
Sorry, forgot to mention the version. We are on scartgap, which does not seem have this commit yet. Thank you very much for the pointer though. I assume there is no easy workaround for scarthgap.

Backporting that commit might be trivial, give it a try?

Ross