On 06/11/2023 16.07, Richard Purdie wrote: > On Mon, 2023-11-06 at 16:00 +0100, Rasmus Villemoes wrote: >> >> When I set PACKAGECONFIG for perf in a perf.bbappend file, without >> python being in there, the build breaks: >> [...] >> This difference is, to put it mildly, quite confusing and surprising >> (and took quite some time to track down). I don't know if there's >> anything to do about it. Is setting PACKAGECONFIG via :pn-foo overrides >> the only supported method, or is this just a quirk of the perf recipe >> that one has to live with? > > That is a pretty horrible interaction of things. As you say, that > inherit is effectively an immediate expansion of the data and wouldn't > "see" changes in any bbappend. > > Could you file a bug please?
Done. https://bugzilla.yoctoproject.org/show_bug.cgi?id=15276 I now see that the same problem probably exists for the perl item (just the other way around because perl is not initially in PACKAGECONFIG); the line include ${@bb.utils.contains('PACKAGECONFIG', 'perl', 'perf-perl.inc', '', d)} won't have effect if perl is only set in PACKAGECONFIG in a .bbappend. > I'm wondering if we should have some other form of inherit which > applies at the end of parsing which would avoid that issue. Sometimes > order is important, sometimes it is less important with the inherits. Dunno. Maybe a new bitbake keyword "defer" (or "late" or whatever): defer inherit ${@something(PACKAGECONFIG)} that would parse the rest of the line as usual, but instead of adding directly to the statements list, instead to some new deferred_statements (which StatementGroup could track itself, it would probably just need to be taught .append_deferred and .eval_deferred methods and have a .deferred member). I don't really know much about bitbake internals, it doesn't sound too hard to do, but I'm probably missing something. Also, perhaps it's too subtle. Rasmus
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#190258): https://lists.openembedded.org/g/openembedded-core/message/190258 Mute This Topic: https://lists.openembedded.org/mt/102420698/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-