Le mer. 18 déc. 2019 à 21:10, Konrad Weihmann <[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]
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub  [
> [email protected]]
> -=-=-=-=-=-=-=-=-=-=-=-
>


-- 
Yann Dirson <[email protected]>
Blade / Shadow -- http://shadow.tech
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#47764): https://lists.yoctoproject.org/g/yocto/message/47764
Mute This Topic: https://lists.yoctoproject.org/mt/68804558/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to