Thanks for your input – That‘s what I used as well in the past, but I have to admit it’s hard to read and to debug, that’s why I want to omit such constructs. So is there a less hacky way (maybe without the conditional syntax, which I still think is a readability nightmare)?
Von: Yann Dirson [mailto:[email protected]] Gesendet: Mittwoch, 18. Dezember 2019 22:59 An: Konrad Weihmann Cc: [email protected] Betreff: Re: [yocto] Inverse of BBFILES_DYNAMIC Le mer. 18 déc. 2019 à 21:10, Konrad Weihmann <[email protected]<mailto:[email protected]>> a écrit : Hi All, I was wondering if there is already a mechanism which kind of mimics the inverse of BBFILES_DYNAMIC. Like I want a recipe to be put into tree only if a layer is absent. Example: I need a fancy python-lib, which isn't part of the core-lib, but according to the layer index can be obtained by some 3rd party layer (let's call fancy-layer). For some projects I worked for, it might be challenging to use "fancy-layer" as it doesn't comply with some corporate rules or whatsoever, while others don't see any issues here. What I have in mind is a mechanism like BBFILES_DYNAMIC, but inverse, like BBFILES_DYNAMIC += "!fancy-layer: ${LAYERDIR}/dynamic-layers/fancy-fallback/*/*.bb" So in case fancy-layer is absent, I could put in a recipe which isn't that well maintained (also might including a warning that this only a fallback solution), but does make my layer usable for a wider audience. So back to the original question, is that already existing functionality? Or is there a workaround hack existing? If both not, is that something, that could be considered as valuable by the project (If so I could craft some patches for that)? Before BBFILES_DYNAMIC the funtionnality could already be achieved with code like the following: BBFILES += "${@' '.join('${LAYERDIR}/dynamic-layers/%s/recipes*/*/*.bbappend' % layer \ for layer in BBFILE_COLLECTIONS.split())}" You're only limited by what you can express using such python expressions :) Regards Konrad -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#47760): https://lists.yoctoproject.org/g/yocto/message/47760 Mute This Topic: https://lists.yoctoproject.org/mt/68804558/3618661 Group Owner: [email protected]<mailto:yocto%[email protected]> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]<mailto:[email protected]>] -=-=-=-=-=-=-=-=-=-=-=- -- Yann Dirson <[email protected]<mailto:[email protected]>> Blade / Shadow -- http://shadow.tech
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#47766): https://lists.yoctoproject.org/g/yocto/message/47766 Mute This Topic: https://lists.yoctoproject.org/mt/68804558/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
