From 2040697f1c55c1e60018d439af76a3fc980f815d Mon Sep 17 00:00:00 2001 From: Luca Ceresoli Date: Wed, 28 Feb 2024 12:25:15 +0100 Subject: ref-manual: tasks: do_cleansstate: recommend using '-f' instead for a shared sstate do_cleansstat can produce build errors when using a shared sstate cache. Add a note to clearly discourage, provide a safe alternative (bitbake -f), and the rationale. Suggested-by: Quentin Schulz Link: https://lore.kernel.org/yocto-docs/20240219155513.76738-1-luca.ceresoli@bootlin.com/T/#m5529687ecb0f9ec2dacddcb6ff58e2df73af9cde (From yocto-docs rev: fe023e48a5014e838fb74b77cdf8b0d546db0d21) Signed-off-by: Luca Ceresoli Reviewed-by: Quentin Schulz Signed-off-by: Steve Sakoman --- documentation/ref-manual/tasks.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/documentation/ref-manual/tasks.rst b/documentation/ref-manual/tasks.rst index 16b48ca0bc..c28cd7a94a 100644 --- a/documentation/ref-manual/tasks.rst +++ b/documentation/ref-manual/tasks.rst @@ -514,6 +514,18 @@ When you run the :ref:`ref-tasks-cleansstate` task, the OpenEmbedded build syste no longer uses any sstate. Consequently, building the recipe from scratch is guaranteed. +.. note:: + + Using :ref:`ref-tasks-cleansstate` with a shared :term:`SSTATE_DIR` is + not recommended because it could trigger an error during the build of a + separate BitBake instance. This is because the builds check sstate "up + front" but download the files later, so it if is deleted in the + meantime, it will cause an error but not a total failure as it will + rebuild it. + + The reliable and preferred way to force a new build is to use ``bitbake + -f`` instead. + .. note:: The :ref:`ref-tasks-cleansstate` task cannot remove sstate from a remote sstate -- cgit v1.2.3-54-g00ecf