Jan Hudec
Jan Hudec

Reputation: 76366

Why should one delete sstate-cache when deleting tmp in Yocto build?

The section 5.2.7. build/tmp/ of the Yocto Reference Manual says:

As a last resort, to clean up a build and start it from scratch (other than the downloads), you can remove everything in the tmp directory or get rid of the directory completely. If you do, you should also completely remove the build/sstate-cache directory.

Does this mean that if one deletes the tmp, they should always delete sstate-cache as well and things break if they don't, or is it just a confusing formulation meaning it won't really be from scratch if the sstate-cache is still there?

And if it is the former, what is the reason?

Upvotes: 1

Views: 2881

Answers (1)

Ross Burton
Ross Burton

Reputation: 4063

It's a confusing formulation. If you want to do a build from absolute clean then you need to wipe sstate-cache as otherwise it won't be from scratch. You can delete tmp as much as you want and keep the sstate (personally my tmp is in a tmpfs so gets emptied several times a day, but the sstate-cache is years old).

Upvotes: 3

Related Questions