summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorLuca Ceresoli <luca.ceresoli@bootlin.com>2024-02-28 12:25:14 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-03-06 16:54:54 +0000
commitaca3afe8278e9eceb47e2e7c71efd0ae2c0acac2 (patch)
treef266e56f60b60e6ae8852ff3865459e411d1be5d /documentation
parentaaa609ac2b3f3bd807d1f4d64a507a30210876dd (diff)
downloadpoky-aca3afe8278e9eceb47e2e7c71efd0ae2c0acac2.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: bfeb00f9213b9d2650ccf03ea666387415227be4) Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-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 0db960b22f..16b48ca0bc 100644
--- a/documentation/ref-manual/tasks.rst
+++ b/documentation/ref-manual/tasks.rst
@@ -470,9 +470,29 @@ You can run this task using BitBake as follows::
470 470
471 $ bitbake -c cleanall recipe 471 $ bitbake -c cleanall recipe
472 472
473Typically, you would not normally use the :ref:`ref-tasks-cleanall` task. Do so only 473You should never use the :ref:`ref-tasks-cleanall` task in a normal
474if you want to start fresh with the :ref:`ref-tasks-fetch` 474scenario. If you want to start fresh with the :ref:`ref-tasks-fetch` task,
475task. 475use instead::
476
477 $ bitbake -f -c fetch recipe
478
479.. note::
480
481 The reason to prefer ``bitbake -f -c fetch`` is that the
482 :ref:`ref-tasks-cleanall` task would break in some cases, such as::
483
484 $ bitbake -c fetch recipe
485 $ bitbake -c cleanall recipe-native
486 $ bitbake -c unpack recipe
487
488 because after step 1 there is a stamp file for the
489 :ref:`ref-tasks-fetch` task of ``recipe``, and it won't be removed at
490 step 2 because step 2 uses a different work directory. So the unpack task
491 at step 3 will try to extract the downloaded archive and fail as it has
492 been deleted in step 2.
493
494 Note that this also applies to BitBake from concurrent processes when a
495 shared download directory (:term:`DL_DIR`) is setup.
476 496
477.. _ref-tasks-cleansstate: 497.. _ref-tasks-cleansstate:
478 498