All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Mention existence of three supported "classes" directories
@ 2025-07-08 11:29 Robert P. J. Day
  2025-07-08 11:37 ` [docs] " Antonin Godard
  0 siblings, 1 reply; 4+ messages in thread
From: Robert P. J. Day @ 2025-07-08 11:29 UTC (permalink / raw)
  To: YP docs mailing list; +Cc: BitBake developer list


Early in Section 1, mention that BitBake supports three related
classes directories.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>

---

  I'm not thrilled with this explanation in terms of where it is, but
it's better than not explaining this at all.

diff --git a/doc/bitbake-user-manual/bitbake-user-manual-intro.rst b/doc/bitbake-user-manual/bitbake-user-manual-intro.rst
index 539bb62d8..feab1df9d 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-intro.rst
+++ b/doc/bitbake-user-manual/bitbake-user-manual-intro.rst
@@ -206,6 +206,18 @@ installing (empty by default) and packaging (empty by default). These
 tasks are often overridden or extended by other classes added during the
 project development process.

+.. note::
+
+   While BitBake comes with just the one ``base.bbclass`` file in the
+   ``classes`` directory, it supports class files also being installed
+   in related directories ``classes-global`` and ``classes-recipe`` and
+   will automatically search all three directories for a selectd class
+   file.
+
+   This means that, in this documentation, when you see a reference to
+   class files being in the ``classes`` directory, you can interpret that
+   as meaning in any one of the above three directories.
+
 Layers
 ------



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [docs] [PATCH] Mention existence of three supported "classes" directories
  2025-07-08 11:29 [PATCH] Mention existence of three supported "classes" directories Robert P. J. Day
@ 2025-07-08 11:37 ` Antonin Godard
  2025-07-08 11:42   ` Robert P. J. Day
  0 siblings, 1 reply; 4+ messages in thread
From: Antonin Godard @ 2025-07-08 11:37 UTC (permalink / raw)
  To: Robert P. J. Day, YP docs mailing list; +Cc: BitBake developer list

On Tue Jul 8, 2025 at 1:29 PM CEST, Robert P. J. Day wrote:
>
> Early in Section 1, mention that BitBake supports three related
> classes directories.
>
> Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
>
> ---
>
>   I'm not thrilled with this explanation in terms of where it is, but
> it's better than not explaining this at all.
>
> diff --git a/doc/bitbake-user-manual/bitbake-user-manual-intro.rst b/doc/bitbake-user-manual/bitbake-user-manual-intro.rst
> index 539bb62d8..feab1df9d 100644
> --- a/doc/bitbake-user-manual/bitbake-user-manual-intro.rst
> +++ b/doc/bitbake-user-manual/bitbake-user-manual-intro.rst
> @@ -206,6 +206,18 @@ installing (empty by default) and packaging (empty by default). These
>  tasks are often overridden or extended by other classes added during the
>  project development process.
>
> +.. note::
> +
> +   While BitBake comes with just the one ``base.bbclass`` file in the
> +   ``classes`` directory, it supports class files also being installed
> +   in related directories ``classes-global`` and ``classes-recipe`` and
> +   will automatically search all three directories for a selectd class

s/selectd/selected/

> +   file.
> +
> +   This means that, in this documentation, when you see a reference to
> +   class files being in the ``classes`` directory, you can interpret that
> +   as meaning in any one of the above three directories.

I don't think this is enough explanation on these directories, and as-is it
would create confusion I think.

There are some details about these directories here:
https://bootlin.com/doc/training/yocto/yocto-slides.pdf#19

Maybe that can help you add the explanation?

I would also explain the difference between these directories (classes,
classes-recipe and classes-global) in a paragraph of its own, not in a note.

Thanks,
Antonin

-- 
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [docs] [PATCH] Mention existence of three supported "classes" directories
  2025-07-08 11:37 ` [docs] " Antonin Godard
@ 2025-07-08 11:42   ` Robert P. J. Day
  2025-07-08 11:48     ` Antonin Godard
  0 siblings, 1 reply; 4+ messages in thread
From: Robert P. J. Day @ 2025-07-08 11:42 UTC (permalink / raw)
  To: antonin.godard; +Cc: YP docs mailing list, BitBake developer list

On Tue, 8 Jul 2025, Antonin Godard via lists.yoctoproject.org wrote:

> On Tue Jul 8, 2025 at 1:29 PM CEST, Robert P. J. Day wrote:
> >
> > Early in Section 1, mention that BitBake supports three related
> > classes directories.
> >
> > Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
> >
> > ---
> >
> >   I'm not thrilled with this explanation in terms of where it is, but
> > it's better than not explaining this at all.
> >
> > diff --git a/doc/bitbake-user-manual/bitbake-user-manual-intro.rst b/doc/bitbake-user-manual/bitbake-user-manual-intro.rst
> > index 539bb62d8..feab1df9d 100644
> > --- a/doc/bitbake-user-manual/bitbake-user-manual-intro.rst
> > +++ b/doc/bitbake-user-manual/bitbake-user-manual-intro.rst
> > @@ -206,6 +206,18 @@ installing (empty by default) and packaging (empty by default). These
> >  tasks are often overridden or extended by other classes added during the
> >  project development process.
> >
> > +.. note::
> > +
> > +   While BitBake comes with just the one ``base.bbclass`` file in the
> > +   ``classes`` directory, it supports class files also being installed
> > +   in related directories ``classes-global`` and ``classes-recipe`` and
> > +   will automatically search all three directories for a selectd class
>
> s/selectd/selected/

  already submitted that fix.

> > +   file.
> > +
> > +   This means that, in this documentation, when you see a reference to
> > +   class files being in the ``classes`` directory, you can interpret that
> > +   as meaning in any one of the above three directories.
>
> I don't think this is enough explanation on these directories, and as-is it
> would create confusion I think.
>
> There are some details about these directories here:
> https://bootlin.com/doc/training/yocto/yocto-slides.pdf#19
>
> Maybe that can help you add the explanation?
>
> I would also explain the difference between these directories (classes,
> classes-recipe and classes-global) in a paragraph of its own, not in a note.

  Except that, once again, we would be going outside the bounds of
BitBake. I totally agree that there should be a comprehensive
explanation of these directories, but where does that belong?

rday


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [docs] [PATCH] Mention existence of three supported "classes" directories
  2025-07-08 11:42   ` Robert P. J. Day
@ 2025-07-08 11:48     ` Antonin Godard
  0 siblings, 0 replies; 4+ messages in thread
From: Antonin Godard @ 2025-07-08 11:48 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: YP docs mailing list, BitBake developer list

On Tue Jul 8, 2025 at 1:42 PM CEST, Robert P. J. Day wrote:
> On Tue, 8 Jul 2025, Antonin Godard via lists.yoctoproject.org wrote:
>
>> On Tue Jul 8, 2025 at 1:29 PM CEST, Robert P. J. Day wrote:
>> >
>> > Early in Section 1, mention that BitBake supports three related
>> > classes directories.
>> >
>> > Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
>> >
>> > ---
>> >
>> >   I'm not thrilled with this explanation in terms of where it is, but
>> > it's better than not explaining this at all.
>> >
>> > diff --git a/doc/bitbake-user-manual/bitbake-user-manual-intro.rst b/doc/bitbake-user-manual/bitbake-user-manual-intro.rst
>> > index 539bb62d8..feab1df9d 100644
>> > --- a/doc/bitbake-user-manual/bitbake-user-manual-intro.rst
>> > +++ b/doc/bitbake-user-manual/bitbake-user-manual-intro.rst
>> > @@ -206,6 +206,18 @@ installing (empty by default) and packaging (empty by default). These
>> >  tasks are often overridden or extended by other classes added during the
>> >  project development process.
>> >
>> > +.. note::
>> > +
>> > +   While BitBake comes with just the one ``base.bbclass`` file in the
>> > +   ``classes`` directory, it supports class files also being installed
>> > +   in related directories ``classes-global`` and ``classes-recipe`` and
>> > +   will automatically search all three directories for a selectd class
>>
>> s/selectd/selected/
>
>   already submitted that fix.
>
>> > +   file.
>> > +
>> > +   This means that, in this documentation, when you see a reference to
>> > +   class files being in the ``classes`` directory, you can interpret that
>> > +   as meaning in any one of the above three directories.
>>
>> I don't think this is enough explanation on these directories, and as-is it
>> would create confusion I think.
>>
>> There are some details about these directories here:
>> https://bootlin.com/doc/training/yocto/yocto-slides.pdf#19
>>
>> Maybe that can help you add the explanation?
>>
>> I would also explain the difference between these directories (classes,
>> classes-recipe and classes-global) in a paragraph of its own, not in a note.
>
>   Except that, once again, we would be going outside the bounds of
> BitBake. I totally agree that there should be a comprehensive
> explanation of these directories, but where does that belong?

I think that saying:

- classes-recipe is meant for recipes, and are inherited through the
  `inherit` directive
- classes-global is meant to be inherited through the `INHERIT` variable
- classes can be used in both context

should not be out-of-boundary.

Antonin

-- 
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-07-08 11:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-08 11:29 [PATCH] Mention existence of three supported "classes" directories Robert P. J. Day
2025-07-08 11:37 ` [docs] " Antonin Godard
2025-07-08 11:42   ` Robert P. J. Day
2025-07-08 11:48     ` Antonin Godard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.