Skip to contentSkip to conversation

qemu.bbclass: move to classes/ directory so that INHERIT can use it

PATCH In review [email protected] 3 participants 3 messages Apr 7, 2025

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 qemu.bbclass: move to classes/ directory so that INHERIT can use it

From: Chen Qi <[email protected]>

The functions in this bbclass make running binaries via qemu user mode easier. These functions are generally useful, regardless of how this bbclass is inherited (via "inherit" or "INHERIT"). So move it to classes/ directory so that these functions could be used by both individual recipes and other bbclass that are intended to be used via INHERIT.

---
 meta/{classes-recipe => classes}/qemu.bbclass | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename meta/{classes-recipe => classes}/qemu.bbclass (100%)
meta/classes/qemu.bbclass renamed from meta/classes-recipe/qemu.bbclass +0 -0
similarity index 100%
rename from meta/classes-recipe/qemu.bbclass
rename to meta/classes/qemu.bbclass
Signature · 1 line
2.49.0
#1 lore raw
Quoted 8 lines · Chen Qi via lists.openembedded.org

From: Chen Qi <[email protected]>

The functions in this bbclass make running binaries via qemu user mode easier. These functions are generally useful, regardless of how this bbclass is inherited (via "inherit" or "INHERIT"). So move it to classes/ directory so that these functions could be used by both individual recipes and other bbclass that are intended to be used via INHERIT.

Global INHERITs are typically used to enable specific features (like buildhistory or cve-check), not to simply add functions that other pieces of code can use.

I agree with Alex, if we refactor these functions to make them more easily available outside of recipe-scope then adding functions to lib/oe/ would be the right thing to do.

Ross

#2 lore raw
In reply to [email protected]
Quoted 10 lines · Chen Qi via lists.openembedded.org

From: Chen Qi <[email protected]>

The functions in this bbclass make running binaries via qemu user mode
easier. These functions are generally useful, regardless of how this bbclass is inherited (via "inherit" or "INHERIT"). So move it to classes/
directory so that these functions could be used by both individual recipes
and other bbclass that are intended to be used via INHERIT.

It depends on the build system used whether Qemu is available or not. For Meson, for example, it is always available. For CMake there is a bbclass cmake-qemu.bbclass that allows to make Qemu available for certain recipes. It could be that such an approach could also make sense for other build systems.

Regards,
Adrian

Quoted 24 lines

---
 meta/{classes-recipe => classes}/qemu.bbclass | 0

 1 file changed, 0 insertions(+), 0 deletions(-)

 rename meta/{classes-recipe => classes}/qemu.bbclass (100%)

meta/classes/qemu.bbclass renamed from meta/classes-recipe/qemu.bbclass +0 -1
similarity index 100%
rename from meta/classes-recipe/qemu.bbclass
rename to meta/classes/qemu.bbclass
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group. View/Reply Online (#214399):
https://lists.openembedded.org/g/openembedded-core/message/214399
Mute This Topic: https://lists.openembedded.org/mt/112128298/4454582
Group Owner: [email protected] Unsubscribe:
https://lists.openembedded.org/g/openembedded-core/unsub [
[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-