diff mbox series

[1/2] dev-manual/building.rst: add note about globally inheriting externalsrc class

Message ID 20250921132033.31644-2-bhstalel@gmail.com
State Under Review
Headers show
Series Document some checks in externalsrc that could fail the build | expand

Commit Message

Talel BELHAJ SALEM Sept. 21, 2025, 1:20 p.m. UTC
Signed-off-by: Talel BELHAJ SALEM <bhstalel@gmail.com>
---
 documentation/dev-manual/building.rst | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Antonin Godard Sept. 22, 2025, 2:18 p.m. UTC | #1
On Sun Sep 21, 2025 at 3:20 PM CEST, BELHADJ SALEM Talel via lists.yoctoproject.org wrote:
> Signed-off-by: Talel BELHAJ SALEM <bhstalel@gmail.com>
> ---
>  documentation/dev-manual/building.rst | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/documentation/dev-manual/building.rst b/documentation/dev-manual/building.rst
> index 04c150094..8d00d908e 100644
> --- a/documentation/dev-manual/building.rst
> +++ b/documentation/dev-manual/building.rst
> @@ -736,6 +736,13 @@ are the statements to put in your ``local.conf`` file::
>     INHERIT += "externalsrc"
>     EXTERNALSRC:pn-myrecipe = "path-to-your-source-tree"
>  
> +.. note::
> +
> +   When you inherit :ref:`ref-classes-externalsrc` class globally make
> +   sure to set the :term:`EXTERNALSRC` and :term:`EXTERNALSRC_BUILD`
> +   variables to specific recipes, not doing that will redirect
> +   all recipes to one external source directory.
> +
>  This next example shows how to accomplish the same thing by setting
>  :term:`EXTERNALSRC` in the recipe itself or in the recipe's append file::
>  

Hi,

When reading this, I had the feeling that the previous paragraph shows how to
set EXTERNALSRC for a specific recipe, and the next paragraph shows how to set
both EXTERNALSRC and EXTERNALSRC_BUILD from a recipe - which is exactly what you
say in your note. So, why a note to repeat this? What was the intent?

Antonin
Talel BELHAJ SALEM Sept. 22, 2025, 6:08 p.m. UTC | #2
I think that beginners may not catch the idea from the example, and they,
accidentally, inherit globally without setting them to specific recipes.

Kind regards

On Mon, 22 Sep 2025 at 15:18 Antonin Godard <antonin.godard@bootlin.com>
wrote:

> On Sun Sep 21, 2025 at 3:20 PM CEST, BELHADJ SALEM Talel via
> lists.yoctoproject.org wrote:
> > Signed-off-by: Talel BELHAJ SALEM <bhstalel@gmail.com>
> > ---
> >  documentation/dev-manual/building.rst | 7 +++++++
> >  1 file changed, 7 insertions(+)
> >
> > diff --git a/documentation/dev-manual/building.rst
> b/documentation/dev-manual/building.rst
> > index 04c150094..8d00d908e 100644
> > --- a/documentation/dev-manual/building.rst
> > +++ b/documentation/dev-manual/building.rst
> > @@ -736,6 +736,13 @@ are the statements to put in your ``local.conf``
> file::
> >     INHERIT += "externalsrc"
> >     EXTERNALSRC:pn-myrecipe = "path-to-your-source-tree"
> >
> > +.. note::
> > +
> > +   When you inherit :ref:`ref-classes-externalsrc` class globally make
> > +   sure to set the :term:`EXTERNALSRC` and :term:`EXTERNALSRC_BUILD`
> > +   variables to specific recipes, not doing that will redirect
> > +   all recipes to one external source directory.
> > +
> >  This next example shows how to accomplish the same thing by setting
> >  :term:`EXTERNALSRC` in the recipe itself or in the recipe's append
> file::
> >
>
> Hi,
>
> When reading this, I had the feeling that the previous paragraph shows how
> to
> set EXTERNALSRC for a specific recipe, and the next paragraph shows how to
> set
> both EXTERNALSRC and EXTERNALSRC_BUILD from a recipe - which is exactly
> what you
> say in your note. So, why a note to repeat this? What was the intent?
>
> Antonin
>
> --
> Antonin Godard, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>
>
Antonin Godard Sept. 23, 2025, 4:08 p.m. UTC | #3
On Mon Sep 22, 2025 at 8:08 PM CEST, BELHADJ SALEM Talel via lists.yoctoproject.org wrote:
> I think that beginners may not catch the idea from the example, and they,
> accidentally, inherit globally without setting them to specific recipes.

Understood. Then I would rephrase the sentence in the next paragraph after your
note, instead of adding the note.

Thanks,
Antonin
diff mbox series

Patch

diff --git a/documentation/dev-manual/building.rst b/documentation/dev-manual/building.rst
index 04c150094..8d00d908e 100644
--- a/documentation/dev-manual/building.rst
+++ b/documentation/dev-manual/building.rst
@@ -736,6 +736,13 @@  are the statements to put in your ``local.conf`` file::
    INHERIT += "externalsrc"
    EXTERNALSRC:pn-myrecipe = "path-to-your-source-tree"
 
+.. note::
+
+   When you inherit :ref:`ref-classes-externalsrc` class globally make
+   sure to set the :term:`EXTERNALSRC` and :term:`EXTERNALSRC_BUILD`
+   variables to specific recipes, not doing that will redirect
+   all recipes to one external source directory.
+
 This next example shows how to accomplish the same thing by setting
 :term:`EXTERNALSRC` in the recipe itself or in the recipe's append file::