Skip to contentSkip to conversation

Is there any way to remove some package frome IMAGE_INSTALL conditionally in local.conf?

DISCUSSION tugouxp 2 participants 2 messages Aug 1, 2018

lore
Share & tools
lore

tugouxp

author
#0 lore raw

hi folks:

i meet an problem that need keep TCLIBC both work in "musl" and "glibc" environment , but a user-defined package cant work with "glibc", so i need to remote them in the "IMAGE_INSTALL" variable,
but i don`t want to offer a seperate "image*.bb" files for this reason because it may be cause the customer misunderstand, so i have a thought to judge the "TCLIBC" and do the remove operation during bitbake runtime in local.conf like this in local.conf

if TCLIBC == glibc
IMAGE_INSTALL_remove="package1 package2"

else
do nothing
endif

so, how the above pseudo code be implemented in bitbake config files? thanks for your support.

#1 lore raw

IMAGE_INSTALL_remove = "${@'package1 package2' if TCLIBC == 'glibc' else ''}"
This only removes packages from IMAGE_INSTALL variable.
So if packages are not removed, you may want to use PACKAGE_EXCLUDE to replace IMAGE_INSTALL_remove above.

Best Regards,
Chen Qi

Quoted 20 lines · tugouxp

hi folks:

i meet an problem that need keep TCLIBC both work in "musl" and
"glibc" environment , but a user-defined package cant work with "glibc", so i need to remote them in the "IMAGE_INSTALL" variable,
but i don`t want to offer a seperate "image*.bb" files for this reason because it may be cause the customer misunderstand, so i have a thought to judge the "TCLIBC" and do the remove operation during bitbake runtime in local.conf like this in local.conf

if TCLIBC == glibc
IMAGE_INSTALL_remove="package1 package2"
else
do nothing
endif

so, how the above pseudo code be implemented in bitbake config files? thanks for your support.