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

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Tue Apr 7 12:36:31 UTC 2015


(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"

-- 
Tanu




More information about the Openembedded-core mailing list