diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-03-11 23:34:27 +0000 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-03-11 23:34:27 +0000 |
| commit | 947678262ae85f214a306ff41d7352485c8d5a03 (patch) | |
| tree | 06e7e0a29528f3d73a901456252efc559ebebc4e /classes/meta-virt-container-cfg.bbclass | |
| parent | 09a89703b9fb4ce19bd4baabc57bec33c6a8d4a7 (diff) | |
| download | meta-virtualization-947678262ae85f214a306ff41d7352485c8d5a03.tar.gz | |
container-registry: make IMAGE_FEATURES conditional on distro features
Move the container-registry IMAGE_FEATURES[validitems] registration
from layer.conf into meta-virt-container-cfg.bbclass where it can be
gated on DISTRO_FEATURES. The validitems varflag is now only registered
when vcontainer or virtualization is in DISTRO_FEATURES.
layer.conf is parsed before distro features are known, so inline
Python cannot be used there. The bbclass is loaded via USER_CLASSES
(deferred parsing) and already handles container profile configuration.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'classes/meta-virt-container-cfg.bbclass')
| -rw-r--r-- | classes/meta-virt-container-cfg.bbclass | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/classes/meta-virt-container-cfg.bbclass b/classes/meta-virt-container-cfg.bbclass index 9a4b144e..f797a6aa 100644 --- a/classes/meta-virt-container-cfg.bbclass +++ b/classes/meta-virt-container-cfg.bbclass | |||
| @@ -8,3 +8,6 @@ | |||
| 8 | # match the other configs of the layer and in case the above statement isn't | 8 | # match the other configs of the layer and in case the above statement isn't |
| 9 | # always true in the future. | 9 | # always true in the future. |
| 10 | include ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', '${META_VIRT_CONTAINER_CONFIG_PATH}', '${META_VIRT_CONTAINER_CONFIG_PATH}', d)} | 10 | include ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', '${META_VIRT_CONTAINER_CONFIG_PATH}', '${META_VIRT_CONTAINER_CONFIG_PATH}', d)} |
| 11 | |||
| 12 | # Register custom IMAGE_FEATURES only when container features are enabled | ||
| 13 | IMAGE_FEATURES[validitems] += "${@bb.utils.contains_any('DISTRO_FEATURES', 'vcontainer virtualization', 'container-registry', '', d)}" | ||
