conf: defer DISTRO_FEATURE check to bbclass processing

We were using USER_CLASS loading to allow conditional checking
on DISTRO_FEATURES, which triggered distro feature specific version
pinning.

It was found that DISTRO_FEATURES set in local.conf is not
consistently available at layer.conf parse time, hence our checks
were not always working as expected (i.e. the version files are
not included).

If we move the DISTRO_FEATURE check to the bbclasses, and use it
to trigger the include, we should have a consistent set of variable
resolution and consistent behaviour.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
Bruce Ashfield 2020-02-10 10:27:56 -05:00
parent c1bc3963ba
commit 3a7d446fa9
3 changed files with 4 additions and 4 deletions

View File

@ -3,4 +3,4 @@
# layer.conf load time, we delay using a special bbclass that simply includes
# the META_VIRT_CONFIG_PATH file.
include ${META_VIRT_CONFIG_PATH}
include ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', '${META_VIRT_CONFIG_PATH}', '', d)}

View File

@ -3,4 +3,4 @@
# layer.conf load time, we delay using a special bbclass that simply includes
# the K8S_CONFIG_PATH file.
include ${K8S_CONFIG_PATH}
include ${@bb.utils.contains('DISTRO_FEATURES', 'k8s', '${K8S_CONFIG_PATH}', '', d)}

View File

@ -46,5 +46,5 @@ INHERIT += "sanity-meta-virt"
# the META_VIRT_CONFIG_PATH file, and likewise for the k8s configs
META_VIRT_CONFIG_PATH = "${LAYERDIR}/conf/distro/include/meta-virt-default-versions.inc"
K8S_CONFIG_PATH = "${LAYERDIR}/conf/distro/include/k8s-versions.inc"
USER_CLASSES_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', 'meta-virt-cfg', '', d)}"
USER_CLASSES_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'k8s', 'meta-virt-k8s-cfg', '', d)}"
USER_CLASSES_append = " meta-virt-cfg"
USER_CLASSES_append = " meta-virt-k8s-cfg"