Message ID | 20250120165117.737681-1-enrico.scholz@sigma-chemnitz.de |
---|---|
State | New |
Headers | show |
Series | [meta-lts-mixins,scarthgap/rust] classes: rename to classes-recipes/ | expand |
On Mon, 20 Jan 2025, Enrico Scholz wrote: > From: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> > > bitbake looks first in 'classes-recipes/' and then in 'classes/'. > Hence, content had no effect and was just ignored. > > Rename folder so that it overrides the OE-core classes. > > Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> [snip] I'm pretty sure this is incorrect. bitbake does look in classes-global, classes-recipe, and then classes, but that does not matter in this instance as it is iterating through BBPATH at a higher level when searching, and should be finding the mixin layer first. Running "bitbake-layers show-overlayed" here (see below) shows the expected behavior, please try that locally to double-check yourself. There is likely a case to be made with respect to easing future backporting that the classes can be moved to classes-recipe now, but the commit message would need to reflect that if you still want to bother. I am going to work on backporting 1.81 later this week, so I can do it then myself, perhaps. The small incentive for not doing it is then I have different workflow for the kirkstone and scarthgap mixins, so I'll think about it a bit. Scott -- [scottm@ghidorah build.scarthgap]$ bitbake-layers show-overlayed NOTE: Starting bitbake server... Loading cache: 100% |##########################################################################################################################################################################################################################################| Time: 0:00:00 Loaded 1979 entries from dependency cache. === Overlayed recipes === aspell: meta 0.60.8.1 meta-selftest 0.0.0.1 cargo: meta-lts-mixins.scarthgap 1.80.1 meta 1.75.0 cargo-c-native: meta-lts-mixins.scarthgap 0.10.3+cargo-0.81.0 meta 0.9.30+cargo-0.77.0 librsvg: meta-lts-mixins.scarthgap 2.58.2 meta 2.57.1 libstd-rs: meta-lts-mixins.scarthgap 1.80.1 meta 1.75.0 rust: meta-lts-mixins.scarthgap 1.80.1 meta 1.75.0 rust-cross-canadian-x86-64: meta-lts-mixins.scarthgap 1.80.1 meta 1.75.0 rust-llvm: meta-lts-mixins.scarthgap 1.80.1 meta 1.75.0 === Overlayed classes === rust-target-config.bbclass: meta-lts-mixins.scarthgap meta cargo_c.bbclass: meta-lts-mixins.scarthgap meta cargo_common.bbclass: meta-lts-mixins.scarthgap meta rust-common.bbclass: meta-lts-mixins.scarthgap meta cargo.bbclass: meta-lts-mixins.scarthgap meta cargo-update-recipe-crates.bbclass: meta-lts-mixins.scarthgap meta rust.bbclass: meta-lts-mixins.scarthgap meta
Scott Murray <scott.murray@konsulko.com> writes: >> bitbake looks first in 'classes-recipes/' and then in 'classes/'. >> Hence, content had no effect and was just ignored. >> >> Rename folder so that it overrides the OE-core classes. >> >> Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> > [snip] > > I'm pretty sure this is incorrect. Logic is in [1] --> first iterate (using $BBPATH) in 'recipes-%', then in 'recipes' For now, it does not matter because classes in OE core and meta-lts-mixins are very similar. But 1.81 seems to introduce other data layouts so correct classes are probably important. I stumpled across it while fixing cargo-native build errors [2] Enrico Footnotes: [1] https://github.com/openembedded/bitbake/blob/0329a7e3ac694737f2d2c1861f65492551360663/lib/bb/parse/parse_py/BBHandler.py#L53-L68 [2] https://lists.openembedded.org/g/openembedded-core/message/210043
On Mon, 20 Jan 2025, Enrico Scholz wrote: > Scott Murray <scott.murray@konsulko.com> writes: > > >> bitbake looks first in 'classes-recipes/' and then in 'classes/'. > >> Hence, content had no effect and was just ignored. > >> > >> Rename folder so that it overrides the OE-core classes. > >> > >> Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> > > [snip] > > > > I'm pretty sure this is incorrect. > > Logic is in [1] > > --> first iterate (using $BBPATH) in 'recipes-%', then in 'recipes' Hmm, the code I looked at was in lib/bblayers/query.py, and its logic is different AFAICT. Can you confirm that "bitbake-layers show-overlayed" shows it as being overlayed for you as it does for me? That it does would seem to indicate a bblayers bug, and there is perhaps some missing documentation of this behavior (change) (e.g. I don't see any mention of classes-global vs classes-recipe vs classes and how their prioritization works wrt layers in the docs). I'm CC'ing oe-core just in case I'm really missing something here... > For now, it does not matter because classes in OE core and meta-lts-mixins > are very similar. But 1.81 seems to introduce other data layouts so correct > classes are probably important. > > I stumpled across it while fixing cargo-native build errors [2] Okay, I'll queue it up once I have some cycles to do some test builds here. > Enrico > > Footnotes: > [1] https://github.com/openembedded/bitbake/blob/0329a7e3ac694737f2d2c1861f65492551360663/lib/bb/parse/parse_py/BBHandler.py#L53-L68 > > [2] https://lists.openembedded.org/g/openembedded-core/message/210043 > > Scott
On Mon, 2025-01-20 at 16:32 -0500, Scott Murray via lists.yoctoproject.org wrote: > On Mon, 20 Jan 2025, Enrico Scholz wrote: > > > Scott Murray <scott.murray@konsulko.com> writes: > > > > > > bitbake looks first in 'classes-recipes/' and then in > > > > 'classes/'. > > > > Hence, content had no effect and was just ignored. > > > > > > > > Rename folder so that it overrides the OE-core classes. > > > > > > > > Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> > > > [snip] > > > > > > I'm pretty sure this is incorrect. > > > > Logic is in [1] > > > > --> first iterate (using $BBPATH) in 'recipes-%', then in 'recipes' > > Hmm, the code I looked at was in lib/bblayers/query.py, and its logic is > different AFAICT. Can you confirm that "bitbake-layers show-overlayed" > shows it as being overlayed for you as it does for me? That it does > would seem to indicate a bblayers bug, and there is perhaps some missing > documentation of this behavior (change) (e.g. I don't see any mention of > classes-global vs classes-recipe vs classes and how their prioritization > works wrt layers in the docs). I'm CC'ing oe-core just in case I'm > really missing something here... I think bblayers needs fixing and we need to sort the docs too... Copying Antonin as we probably want a bug to track that. Cheers, Richard
Hi all, On Mon Jan 20, 2025 at 11:54 PM CET, Richard Purdie wrote: > On Mon, 2025-01-20 at 16:32 -0500, Scott Murray via lists.yoctoproject.org wrote: >> On Mon, 20 Jan 2025, Enrico Scholz wrote: >> >> > Scott Murray <scott.murray@konsulko.com> writes: >> > >> > > > bitbake looks first in 'classes-recipes/' and then in >> > > > 'classes/'. >> > > > Hence, content had no effect and was just ignored. >> > > > >> > > > Rename folder so that it overrides the OE-core classes. >> > > > >> > > > Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> >> > > [snip] >> > > >> > > I'm pretty sure this is incorrect. >> > >> > Logic is in [1] >> > >> > --> first iterate (using $BBPATH) in 'recipes-%', then in 'recipes' >> >> Hmm, the code I looked at was in lib/bblayers/query.py, and its logic is >> different AFAICT. Can you confirm that "bitbake-layers show-overlayed" >> shows it as being overlayed for you as it does for me? That it does >> would seem to indicate a bblayers bug, and there is perhaps some missing >> documentation of this behavior (change) (e.g. I don't see any mention of >> classes-global vs classes-recipe vs classes and how their prioritization >> works wrt layers in the docs). I'm CC'ing oe-core just in case I'm >> really missing something here... > > I think bblayers needs fixing and we need to sort the docs too... > > Copying Antonin as we probably want a bug to track that. I've created a bug to track this: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15724 Scott, I've assigned you to it, as you proposed to add this yesterday on the tech meeting. Let me know if you need any help for adding documentation (it should be part of bitbake/doc most likely). Also let me know if I got it wrong yesterday and if I should re-assign this. Thank you, Antonin
diff --git a/classes/cargo-update-recipe-crates.bbclass b/classes-recipe/cargo-update-recipe-crates.bbclass similarity index 100% rename from classes/cargo-update-recipe-crates.bbclass rename to classes-recipe/cargo-update-recipe-crates.bbclass diff --git a/classes/cargo.bbclass b/classes-recipe/cargo.bbclass similarity index 100% rename from classes/cargo.bbclass rename to classes-recipe/cargo.bbclass diff --git a/classes/cargo_c.bbclass b/classes-recipe/cargo_c.bbclass similarity index 100% rename from classes/cargo_c.bbclass rename to classes-recipe/cargo_c.bbclass diff --git a/classes/cargo_common.bbclass b/classes-recipe/cargo_common.bbclass similarity index 100% rename from classes/cargo_common.bbclass rename to classes-recipe/cargo_common.bbclass diff --git a/classes/rust-common.bbclass b/classes-recipe/rust-common.bbclass similarity index 100% rename from classes/rust-common.bbclass rename to classes-recipe/rust-common.bbclass diff --git a/classes/rust-target-config.bbclass b/classes-recipe/rust-target-config.bbclass similarity index 100% rename from classes/rust-target-config.bbclass rename to classes-recipe/rust-target-config.bbclass diff --git a/classes/rust.bbclass b/classes-recipe/rust.bbclass similarity index 100% rename from classes/rust.bbclass rename to classes-recipe/rust.bbclass