diff mbox series

[v3,2/2] ref-manual: tasks: do_cleansstate: recommend using '-f' instead for a shared sstate

Message ID 20240228-clean-tasks-notes-v3-2-368af5e1aa0e@bootlin.com
State New
Headers show
Series Discourage using do_cleansstate and do_cleanall | expand

Commit Message

Luca Ceresoli Feb. 28, 2024, 11:25 a.m. UTC
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.

Proposed-by: Quentin Schulz  <quentin.schulz@theobroma-systems.com>
Link: https://lore.kernel.org/yocto-docs/20240219155513.76738-1-luca.ceresoli@bootlin.com/T/#m5529687ecb0f9ec2dacddcb6ff58e2df73af9cde
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
---
 documentation/ref-manual/tasks.rst | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Quentin Schulz Feb. 28, 2024, 11:46 a.m. UTC | #1
Hi Luca,

On 2/28/24 12:25, Luca Ceresoli wrote:
> 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.
> 
> Proposed-by: Quentin Schulz  <quentin.schulz@theobroma-systems.com>

In poky:
$ git log --oneline --grep "Proposed-by" | wc -l
2
$ git log --oneline --grep "Suggested-by" | wc -l
46

https://git-scm.com/docs/SubmittingPatches#sign-off also only mentions 
Suggested-by as a trailer.

Not really important, it just surprised me to see this trailer for the 
first time :)

For the whole series,

Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>

Thanks,
Quentin
Michael Opdenacker Feb. 29, 2024, 11:07 a.m. UTC | #2
Luca, Quentin,

Many thanks for the patches and reviews!

On 2/28/24 at 12:46, Quentin Schulz via lists.yoctoproject.org wrote:
> Hi Luca,
>
> On 2/28/24 12:25, Luca Ceresoli wrote:
>> 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.
>>
>> Proposed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
>
> In poky:
> $ git log --oneline --grep "Proposed-by" | wc -l
> 2
> $ git log --oneline --grep "Suggested-by" | wc -l
> 46
>
> https://git-scm.com/docs/SubmittingPatches#sign-off also only mentions 
> Suggested-by as a trailer.
>
> Not really important, it just surprised me to see this trailer for the 
> first time :)

I fixed this in the commit.

>
> For the whole series,
>
> Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>


Merged into "master-next"
Thanks again.
Michael.
diff mbox series

Patch

diff --git a/documentation/ref-manual/tasks.rst b/documentation/ref-manual/tasks.rst
index 7a0915c6e57a..79469bc37221 100644
--- a/documentation/ref-manual/tasks.rst
+++ b/documentation/ref-manual/tasks.rst
@@ -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