Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable sstate-cache per recipe in Yocto

Tags:

yocto

bitbake

I have some self written yocto recipes, which create issues with the yocto sstate-cache mechanism (like not rebuilding the recipe when dependencies have changed). Is there a way to disable sstate-caching on a per recipe basis?

Searching the interwebs I can only find very old and by now broken mechanisms:

https://patchwork.openembedded.org/patch/17039/

Or only partial disable functions:

https://patchwork.openembedded.org/patch/130719/

My Yocto version is Zeus and above.

Thanks and cheers!

like image 901
Martin H. Avatar asked Oct 30 '25 14:10

Martin H.


1 Answers

In the recipe:

SSTATE_SKIP_CREATION = "1"

or, from outside the recipe (e.g. local.conf):

SSTATE_SKIP_CREATION_pn-recipefoo = "1"
SSTATE_SKIP_CREATION_pn-recipebar = "1"

You can verify if sstate exists for a recipe, using oe-check-sstate, e.g.:

oe-check-sstate yourimage | grep recipefoo

and you can remove sstate for a recipe using:

bitbake -c cleansstate recipefoo

However, it is concerning that your recipe interferes with the sstate mechanism. Ensure that you are correctly setting & updating the version and revision of your packages whenever the source code changes.

If your recipe source is stored alongside your Yocto metadata, consider using externalsrc to reference it, allowing Yocto to better track changes.

like image 133
justinsg Avatar answered Nov 04 '25 19:11

justinsg



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!