* Inverse of BBFILES_DYNAMIC
@ 2019-12-18 20:10 Konrad Weihmann
2019-12-18 21:59 ` [yocto] " Yann Dirson
0 siblings, 1 reply; 3+ messages in thread
From: Konrad Weihmann @ 2019-12-18 20:10 UTC (permalink / raw)
To: 'yocto@lists.yoctoproject.org'
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)?
Regards
Konrad
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [yocto] Inverse of BBFILES_DYNAMIC
2019-12-18 20:10 Inverse of BBFILES_DYNAMIC Konrad Weihmann
@ 2019-12-18 21:59 ` Yann Dirson
2019-12-19 6:54 ` Konrad Weihmann
0 siblings, 1 reply; 3+ messages in thread
From: Yann Dirson @ 2019-12-18 21:59 UTC (permalink / raw)
To: Konrad Weihmann; +Cc: yocto
[-- Attachment #1: Type: text/plain, Size: 2170 bytes --]
Le mer. 18 déc. 2019 à 21:10, Konrad Weihmann <kweihmann@outlook.com> 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: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [
> yann.dirson@blade-group.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
--
Yann Dirson <yann@blade-group.com>
Blade / Shadow -- http://shadow.tech
[-- Attachment #2: Type: text/html, Size: 3425 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [yocto] Inverse of BBFILES_DYNAMIC
2019-12-18 21:59 ` [yocto] " Yann Dirson
@ 2019-12-19 6:54 ` Konrad Weihmann
0 siblings, 0 replies; 3+ messages in thread
From: Konrad Weihmann @ 2019-12-19 6:54 UTC (permalink / raw)
To: 'yocto@lists.yoctoproject.org'
[-- Attachment #1: Type: text/plain, Size: 2715 bytes --]
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:yann.dirson@blade-group.com]
Gesendet: Mittwoch, 18. Dezember 2019 22:59
An: Konrad Weihmann
Cc: yocto@lists.yoctoproject.org
Betreff: Re: [yocto] Inverse of BBFILES_DYNAMIC
Le mer. 18 déc. 2019 à 21:10, Konrad Weihmann <kweihmann@outlook.com<mailto:kweihmann@outlook.com>> 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: yocto+owner@lists.yoctoproject.org<mailto:yocto%2Bowner@lists.yoctoproject.org>
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [yann.dirson@blade-group.com<mailto:yann.dirson@blade-group.com>]
-=-=-=-=-=-=-=-=-=-=-=-
--
Yann Dirson <yann@blade-group.com<mailto:yann@blade-group.com>>
Blade / Shadow -- http://shadow.tech
[-- Attachment #2: Type: text/html, Size: 7050 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-12-19 6:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-18 20:10 Inverse of BBFILES_DYNAMIC Konrad Weihmann
2019-12-18 21:59 ` [yocto] " Yann Dirson
2019-12-19 6:54 ` Konrad Weihmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.