summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Ceresoli <luca.ceresoli@bootlin.com>2024-02-28 12:25:14 +0100
committerSteve Sakoman <steve@sakoman.com>2024-03-25 04:11:26 -1000
commit59b33ce49732b3dcc0311563c21a02c90322fdab (patch)
treed5f08ab531a56a5814e38d68bb5432e88645656e
parente8d1874bf02028050dd34e471672e12b304b6ec3 (diff)
downloadpoky-59b33ce49732b3dcc0311563c21a02c90322fdab.tar.gz
ref-manual: tasks: do_cleanall: recommend using '-f' instead
do_cleanall can produce failures when used in legitimate cases, such as with recipe variants (foo and foo-native) or a shared DL_DIR. This is why it is forbidden when writing tests that will run on the autobuilders (https://docs.yoctoproject.org/test-manual/intro.html?highlight=cleanall#considerations-when-writing-tests). Reword the documentation to clearly discourage, provide a safe alternative (bitbake -f -c fetch), and the rationale with an example. Reported-by: Sam Liddicott Link: https://bootlin.com/blog/yocto-sharing-the-sstate-cache-and-download-directories/#comment-2650335 (From yocto-docs rev: 92e1d1fba336de12637b75b043b86485b80324a2) 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>
-rw-r--r--documentation/ref-manual/tasks.rst26
1 files changed, 23 insertions, 3 deletions
diff --git a/documentation/ref-manual/tasks.rst b/documentation/ref-manual/tasks.rst
index e61f6659eb..a3258fda55 100644
--- a/documentation/ref-manual/tasks.rst
+++ b/documentation/ref-manual/tasks.rst
@@ -481,9 +481,29 @@ You can run this task using BitBake as follows::
481 481
482 $ bitbake -c cleanall recipe 482 $ bitbake -c cleanall recipe
483 483
484Typically, you would not normally use the ``cleanall`` task. Do so only 484You should never use the :ref:`ref-tasks-cleanall` task in a normal
485if you want to start fresh with the :ref:`ref-tasks-fetch` 485scenario. If you want to start fresh with the :ref:`ref-tasks-fetch` task,
486task. 486use instead::
487
488 $ bitbake -f -c fetch recipe
489
490.. note::
491
492 The reason to prefer ``bitbake -f -c fetch`` is that the
493 :ref:`ref-tasks-cleanall` task would break in some cases, such as::
494
495 $ bitbake -c fetch recipe
496 $ bitbake -c cleanall recipe-native
497 $ bitbake -c unpack recipe
498
499 because after step 1 there is a stamp file for the
500 :ref:`ref-tasks-fetch` task of ``recipe``, and it won't be removed at
501 step 2 because step 2 uses a different work directory. So the unpack task
502 at step 3 will try to extract the downloaded archive and fail as it has
503 been deleted in step 2.
504
505 Note that this also applies to BitBake from concurrent processes when a
506 shared download directory (:term:`DL_DIR`) is setup.
487 507
488.. _ref-tasks-cleansstate: 508.. _ref-tasks-cleansstate:
489 509