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  <quentin.schulz@theobroma-systems.com>
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 <luca.ceresoli@bootlin.com>
Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
Luca Ceresoli 2024-02-28 12:25:15 +01:00 committed by Steve Sakoman
parent 05fc000272
commit 2040697f1c

View File

@ -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