Martin H.
Martin H.

Reputation: 437

How to disable sstate-cache per recipe in Yocto

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!

Upvotes: 3

Views: 5101

Answers (1)

justinsg
justinsg

Reputation: 858

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.

Upvotes: 7

Related Questions