| Message ID | 20250407070827.423672-1-Qi.Chen@windriver.com |
|---|---|
| State | New |
| Headers | show |
| Series | [V2] qemu.bbclass: move to classes/ directory so that INHERIT can use it | expand |
On 7 Apr 2025, at 08:08, Chen Qi via lists.openembedded.org <Qi.Chen=windriver.com@lists.openembedded.org> wrote: > > From: Chen Qi <Qi.Chen@windriver.com> > > 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
On Mon, 2025-04-07 at 00:08 -0700, Chen Qi via lists.openembedded.org wrote: > From: Chen Qi <Qi.Chen@windriver.com> > > 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 > > Signed-off-by: Chen Qi <Qi.Chen@windriver.com> > --- > meta/{classes-recipe => classes}/qemu.bbclass | 0 > 1 file changed, 0 insertions(+), 0 deletions(-) > rename meta/{classes-recipe => classes}/qemu.bbclass (100%) > > diff --git a/meta/classes-recipe/qemu.bbclass > b/meta/classes/qemu.bbclass > 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: openembedded-core+owner@lists.openembedded.org > Unsubscribe: > https://lists.openembedded.org/g/openembedded-core/unsub [ > adrian.freihofer@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
diff --git a/meta/classes-recipe/qemu.bbclass b/meta/classes/qemu.bbclass
similarity index 100%
rename from meta/classes-recipe/qemu.bbclass
rename to meta/classes/qemu.bbclass