Yocto Project Documentation
 help / color / mirror / Atom feed
From: Luca Ceresoli <luca.ceresoli@bootlin.com>
To: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Cc: docs@lists.yoctoproject.org,
	Richard Purdie <richard.purdie@linuxfoundation.org>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH v2 2/2] ref-manual: tasks: do_cleansstate: recommend using '-f' instead for a shared sstate
Date: Tue, 27 Feb 2024 13:00:14 +0100	[thread overview]
Message-ID: <20240227130014.0072c78e@booty> (raw)
In-Reply-To: <d7b36e4e-2eaf-4971-a369-84b727f1cf1b@theobroma-systems.com>

Hi Quentin,

On Tue, 27 Feb 2024 12:30:48 +0100
Quentin Schulz <quentin.schulz@theobroma-systems.com> wrote:

> Hi Luca,
> 
> On 2/27/24 11:59, 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>
> > 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(+)
> > 
> > diff --git a/documentation/ref-manual/tasks.rst b/documentation/ref-manual/tasks.rst
> > index ebaa03dc7613..9f130bb4e0c9 100644
> > --- a/documentation/ref-manual/tasks.rst
> > +++ b/documentation/ref-manual/tasks.rst
> > @@ -513,6 +513,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 sstate directory is not  
> 
> I would add a :term:`SSTATE_DIR` here to highlight what we're talking about.

Sure.

> 
> > +   recommended because it could trigger an error during the build of a  
> 
> s/of/from/ ?
> 
> > +   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.
> > +  
> 
> Is bitbake actually safe from corruption? i.e. what happens if the file 
> gets removed while it's being currently downloaded by another bitbake 
> instance?

I'm happily leaving this question to Richard. :)

> Also, I would really recommend adding a similar warning in the cleanall 
> target. We would have a disclaimer on the use of shared download dir but 
> not on a shared sstate cache. One way to do it could be to link from the 
> cleanall target to the cleansstate target telling the user to check 
> other limitations that apply to both targets.

The first line in the do_cleanall sections points to do_cleansstate,
and in patch 1/2 we have even stronger reasons to not use do_cleanall.
I think that's enough.

Luca

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


      reply	other threads:[~2024-02-27 12:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-27 10:59 [PATCH v2 0/2] Discourage using do_cleansstate and do_cleanall Luca Ceresoli
2024-02-27 10:59 ` [PATCH v2 1/2] ref-manual: tasks: do_cleanall: recommend using '-f fetch' instead Luca Ceresoli
2024-02-27 11:24   ` [docs] " Quentin Schulz
2024-02-27 12:00     ` Luca Ceresoli
2024-02-27 12:23       ` Quentin Schulz
2024-02-28 11:12         ` Luca Ceresoli
2024-02-27 10:59 ` [PATCH v2 2/2] ref-manual: tasks: do_cleansstate: recommend using '-f' instead for a shared sstate Luca Ceresoli
2024-02-27 11:30   ` Quentin Schulz
2024-02-27 12:00     ` Luca Ceresoli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240227130014.0072c78e@booty \
    --to=luca.ceresoli@bootlin.com \
    --cc=docs@lists.yoctoproject.org \
    --cc=quentin.schulz@theobroma-systems.com \
    --cc=richard.purdie@linuxfoundation.org \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox