Skip to contentSkip to conversation

Conditionally adding bblayers

DISCUSSION Cardoz, Fritz 1 participant 1 message Jun 21, 2017

lore
Share & tools
lore
#0 lore raw

Hi all,.

Is there a possibility to add a layer into BBLAYERS variable conditionally in conf/bblayers.conf
My use case is I have a feature "foo" being enabled as part of DISTRO_FEATURES in the conf/local.conf and also add the same into OVERRIDES.

However, the override does not apply when bitbake parses the configuration.

Conf/local.conf:
.
.
DISTRO_FEATURES_append := " foo"
OVERRIDES .= "${@bb.utils.contains('DISTRO_FEATURES', 'foo', ':foo', '', d)}"

Conf/bblayers.conf:
.
.
BBLAYERS_append_foo += " \
${BSPDIR}/meta-bar \
"

Strangely, bitbake -e shows that the BBLAYERS contains this "meta-bar" layer when dumping the environment.

Any suggestions? I am currently on poky-jethro.

Thanks,
Fritz