ref-manual: tasks: do_cleanall: mention it is not allowed with a shared DL_DIR
PATCH 1/1 ref-manual: tasks: do_cleanall: mention it is not allowed with a shared DL_DIR
do_cleanall can produce failures if using a shared download directory. 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).
--- documentation/ref-manual/tasks.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+)
documentation/ref-manual/tasks.rst +13 -0
@@ -474,6 +474,19 @@ Typically, you would not normally use the :ref:`ref-tasks-cleanall` task. Do so if you want to start fresh with the :ref:`ref-tasks-fetch` task. +.. note:: + + Never run the :ref:`ref-tasks-cleanall` task if your :term:`DL_DIR` is + shared. This would break in this scenario:: + + dir1$ bitbake <recipe> -c fetch + dir2$ bitbake <recipe> -c cleanall + dir1$ bitbake <recipe> -c unpack + + because before step 3 in dir1 there is a stamp file for the + :ref:`ref-tasks-fetch` task, so the unpack task will try to extract the + downloaded archive and fail as it has been deleted in step 2. + .. _ref-tasks-cleansstate: ``do_cleansstate``
Signature · 1 line
2.34.1
Hi Luca,
Quoted 18 lines · Luca Ceresoli via lists.yoctoproject.org
[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
do_cleanallcan produce failures if using a shared download directory. 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).Reported-by Sam LiddicottLink https://bootlin.com/blog/yocto-sharing-the-sstate-cache-and-download-directories/#comment-2650335Signed-off-by Luca Ceresoli <[email protected]>--- documentation/ref-manual/tasks.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+)documentation/ref-manual/tasks.rst +0
-0
documentation/ref-manual/tasks.rst Typically, you would not normally use the :ref:`ref-tasks-cleanall` task. Do so · line 479
Quoted 6 lines
documentation/ref-manual/tasks.rst +3
-0@@ -474,6 +474,19 @@ Typically, you would not normally use the :ref:`ref-tasks-cleanall` task. Do so if you want to start fresh with the :ref:`ref-tasks-fetch` task. +.. note:: + + Never run the :ref:`ref-tasks-cleanall` task if your :term:`DL_DIR` is
This also applies if SSTATE_DIR is shared I believe?
documentation/ref-manual/tasks.rst Typically, you would not normally use the :ref:`ref-tasks-cleanall` task. Do so · line 492
Quoted 13 lines
documentation/ref-manual/tasks.rst +10
-0+ shared. This would break in this scenario:: + + dir1$ bitbake <recipe> -c fetch + dir2$ bitbake <recipe> -c cleanall + dir1$ bitbake <recipe> -c unpack + + because before step 3 in dir1 there is a stamp file for the + :ref:`ref-tasks-fetch` task, so the unpack task will try to extract the + downloaded archive and fail as it has been deleted in step 2. + .. _ref-tasks-cleansstate: ``do_cleansstate``
We would need the same warning here for a shared SSTATE_DIR I believe.
Cheers,
Quentin
Hi Quentin,
Quoted 24 lines · On Mon, 19 Feb 2024 17:12:46 +0100 Quentin Schulz…
Hi Luca,
Quoted 21 lines · Luca Ceresoli via lists.yoctoproject.org
[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
do_cleanallcan produce failures if using a shared download directory. 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).Reported-by Sam LiddicottLink https://bootlin.com/blog/yocto-sharing-the-sstate-cache-and-download-directories/#comment-2650335Signed-off-by Luca Ceresoli <[email protected]>--- documentation/ref-manual/tasks.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+)documentation/ref-manual/tasks.rst +0
-0@@ -474,6 +474,19 @@ Typically, you would not normally use the :ref:`ref-tasks-cleanall` task. Do so if you want to start fresh with the :ref:`ref-tasks-fetch` task.
Quoted 5 lines
documentation/ref-manual/tasks.rst Typically, you would not normally use the :ref:`ref-tasks-cleanall` task. Do so · line 479
Quoted 3 lines
documentation/ref-manual/tasks.rst +3
-0+.. note:: + + Never run the :ref:`ref-tasks-cleanall` task if your :term:`DL_DIR` isThis also applies if
SSTATE_DIRis shared I believe?
I don't think so. As far as I understand the sstate cache, a cache entry is either found or not found, while for the downloads there is the strange state of having a do_fetch stamp but no downloaded archive.
However I may be wrong. Do you have an example command sequence where do_cleansstate can create a build failure?
Luca
Signature · 3 lines
Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Quoted 45 lines · Luca Ceresoli via lists.yoctoproject.org
Hi Quentin,
Quoted 33 lines · On Mon, 19 Feb 2024 17:12:46 +0100 Quentin Schulz…
Hi Luca,
Quoted 30 lines · Luca Ceresoli via lists.yoctoproject.org
[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
do_cleanallcan produce failures if using a shared download directory. This
is why it is forbidden when writing tests that will run on the autobuilders
(
https://docs.yoctoproject.org/test-manual/intro.html?highlight=cle
anall#considerations-when-writing-tests).Reported-by: Sam Liddicott
Link:
https://bootlin.com/blog/yocto-sharing-the-sstate-cache-and-download-directories/#comment-2650335Signed-off-by Luca Ceresoli <[email protected]>---
documentation/ref-manual/tasks.rst| 13 +++++++++++++1 file changed, 13 insertions(+)documentation/ref-manual/tasks.rst +0
-0@@ -474,6 +474,19 @@ Typically, you would not normally use the:ref:
ref-tasks-cleanalltask. Do so
if you want to start fresh with the :ref:ref-tasks-fetchtask.Quoted 6 lines
Quoted 4 lines
+.. note::
+
+ Never run the :ref:ref-tasks-cleanalltask if your :term:DL_DIRisThis also applies if
SSTATE_DIRis shared I believe?
Quoted 7 lines
I don't think so. As far as I understand the sstate cache, a cache entry is either found or not found, while for the downloads there is the strange state of having a
do_fetchstamp but no downloaded archive.However I may be wrong. Do you have an example command sequence where
do_cleansstatecan create a build failure?
The builds check sstate "up front" then download later so it if is deleted in the meantime, it will cause an error but not a total failure as it will rebuild it.
We therefore don't recommend cleansstate on a shared sstate directory. Instead you can use -f to invalidate a task.
Cheers,
Richard
Hi all,
Quoted 55 lines · Richard Purdie
Quoted 45 lines · Luca Ceresoli via lists.yoctoproject.org
Hi Quentin,
Quoted 33 lines · On Mon, 19 Feb 2024 17:12:46 +0100 Quentin Schulz…
Hi Luca,
Quoted 30 lines · Luca Ceresoli via lists.yoctoproject.org
[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
do_cleanallcan produce failures if using a shared download directory. This
is why it is forbidden when writing tests that will run on the autobuilders
(
https://docs.yoctoproject.org/test-manual/intro.html?highlight=cle
anall#considerations-when-writing-tests).Reported-by: Sam Liddicott
Link:
https://bootlin.com/blog/yocto-sharing-the-sstate-cache-and-download-directories/#comment-2650335Signed-off-by Luca Ceresoli <[email protected]>--- documentation/ref-manual/tasks.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+)documentation/ref-manual/tasks.rst +0
-0@@ -474,6 +474,19 @@ Typically, you would not normally use the:ref:
ref-tasks-cleanalltask. Do so
if you want to start fresh with the :ref:ref-tasks-fetchtask.Quoted 6 lines
Quoted 4 lines
+.. note::
+
+ Never run the :ref:ref-tasks-cleanalltask if your :term:DL_DIRisThis also applies if
SSTATE_DIRis shared I believe?Quoted 7 lines
I don't think so. As far as I understand the sstate cache, a cache entry is either found or not found, while for the downloads there is the strange state of having a
do_fetchstamp but no downloaded archive.However I may be wrong. Do you have an example command sequence where
do_cleansstatecan create a build failure?
Quoted 7 lines
The builds check sstate "up front" then download later so it if is deleted in the meantime, it will cause an error but not a total failure as it will rebuild it.
We therefore don't recommend cleansstate on a shared sstate directory. Instead you can use -f to invalidate a task.
And considering that cleanall also calls cleansstate (or at least does the same), it applies and we should document it :)
Cheers,
Quentin