[OE-core] [PATCH 5/5] bluetooth.bbclass: set bluez5 as the default BT stack

Martin Jansa martin.jansa at gmail.com
Tue Apr 7 12:44:58 UTC 2015


On Tue, Apr 07, 2015 at 03:36:31PM +0300, Tanu Kaskinen wrote:
> (A friendly request: could you use interleaved posting style as
> described in the mailing list guidelines here:
> https://wiki.yoctoproject.org/wiki/Community_Guidelines )
> 
> On Tue, 2015-04-07 at 11:51 +0000, Iorga, Cristian wrote:
> > The only way this could be fixed is to remove the aforementioned guidelines..
> > Like I said, there are plenty of examples in the code.
> > Those packageconfigs where elaborated based on:
> > 1. if a package has support for both BlueZ versions;
> > 2. If not, usually only BlueZ 4 is supported;
> > 
> > Care to elaborate how I can fix them otherwise? I am open to suggestions.
> 
> Sure, I can give concrete suggestions. This one I already gave in my
> first mail:
> 
> # Use this with:
> #  inherit bluetooth
> #  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)}"
> #  PACKAGECONFIG[bluez4] = "--enable-bluez4,--disable-bluez4,bluez4"
> #  PACKAGECONFIG[bluez5] = "--enable-bluez5,--disable-bluez5,bluez5"
> 
> When someone applies that example to a recipe that only supports one
> bluetooth implementation, then the example of course needs some
> adaptation, but that's ok. I think the example gives a clear enough idea
> how the BLUEZ variable is supposed to be used.
> 
> Note that if you anyway want to also give an example of how to deal with
> recipes that only support one bluetooth implmementation, I think this
> line should be changed:
> 
>   PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)}"
> 
> The reason is that if the recipe only supports bluez4, for example, then
> PACKAGECONFIG should never include bluez5, but that line will put bluez5
> to PACKAGECONFIG if the distro's chosen bluetooth implementation is
> bluez5. I suppose that doesn't actually break anything, but I don't
> think it's a good idea to recommend adding garbage to PACKAGECONFIG.
> 
> This would be more appropriate for recipes that only support bluez4:
> 
> #  inherit bluetooth
> #  PACKAGECONFIG ??= "${@bb.utils.contains('BLUEZ', 'bluez4', 'bluez4, '', d}"
> #  PACKAGECONFIG[bluez4] = "--enable-bluez4,--disable-bluez4,bluez4"

The last example isn't correct, because you still need to respect
'bluetooth' in 'DISTRO_FEATURES' before enabling whatever is in BLUEZ
variable.

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20150407/07f78045/attachment-0002.sig>


More information about the Openembedded-core mailing list