Skip to contentSkip to conversation

Mention existence of three supported "classes" directories

PATCH Superseded Robert P. J. Day 2 participants 4 messages Jul 8, 2025

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Mention existence of three supported "classes" directories

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

---

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

doc/bitbake-user-manual/bitbake-user-manual-intro.rst +12 -0
index 539bb62d8..feab1df9d 100644
@@ -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
 ------
 
#1 lore raw
Quoted 16 lines · Robert P. J. Day

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

---

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

doc/bitbake-user-manual/bitbake-user-manual-intro.rst +0 -0
index 539bb62d8..feab1df9d 100644

doc/bitbake-user-manual/bitbake-user-manual-intro.rst installing (empty by default) and packaging (empty by default). These · line 214

Quoted 9 lines
doc/bitbake-user-manual/bitbake-user-manual-intro.rst +6 -0
@@ -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/

doc/bitbake-user-manual/bitbake-user-manual-intro.rst installing (empty by default) and packaging (empty by default). These · line 219

Quoted 5 lines
doc/bitbake-user-manual/bitbake-user-manual-intro.rst +5 -0
+   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

Signature · 3 lines
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw
Quoted 20 lines · Antonin Godard via lists.yoctoproject.org
Quoted 19 lines · Robert P. J. Day

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

---

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

doc/bitbake-user-manual/bitbake-user-manual-intro.rst +0 -0
index 539bb62d8..feab1df9d 100644
@@ -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.
 
Quoted 8 lines

doc/bitbake-user-manual/bitbake-user-manual-intro.rst installing (empty by default) and packaging (empty by default). These · line 214

Quoted 6 lines
doc/bitbake-user-manual/bitbake-user-manual-intro.rst +6 -0
+.. 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.

Quoted 9 lines

doc/bitbake-user-manual/bitbake-user-manual-intro.rst installing (empty by default) and packaging (empty by default). These · line 219

Quoted 5 lines
doc/bitbake-user-manual/bitbake-user-manual-intro.rst +5 -0
+   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.

Quoted 7 lines

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

#3 lore raw
Quoted 45 lines · Robert P. J. Day
Quoted 20 lines · Antonin Godard via lists.yoctoproject.org
Quoted 19 lines · Robert P. J. Day

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

---

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

doc/bitbake-user-manual/bitbake-user-manual-intro.rst +0 -0
index 539bb62d8..feab1df9d 100644
@@ -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.
 
Quoted 8 lines

doc/bitbake-user-manual/bitbake-user-manual-intro.rst installing (empty by default) and packaging (empty by default). These · line 214

Quoted 6 lines
doc/bitbake-user-manual/bitbake-user-manual-intro.rst +6 -0
+.. 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.

Quoted 12 lines

doc/bitbake-user-manual/bitbake-user-manual-intro.rst installing (empty by default) and packaging (empty by default). These · line 219

Quoted 5 lines
doc/bitbake-user-manual/bitbake-user-manual-intro.rst +5 -0
+   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

Quoted 8 lines
Quoted 4 lines

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

Signature · 3 lines
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com