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: 3fb8b5ad7edfa186744396deb7111ba3e31a857b)

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 59b33ce497
commit 0b59f7efc6

View File

@@ -527,7 +527,19 @@ scratch is guaranteed.
.. note::
The ``do_cleansstate`` task cannot remove sstate from a remote sstate
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
mirror. If you need to build a target from scratch using remote mirrors, use
the "-f" option as follows::