aboutsummaryrefslogtreecommitdiffstats
path: root/classes/meta-virt-container-cfg.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'classes/meta-virt-container-cfg.bbclass')
-rw-r--r--classes/meta-virt-container-cfg.bbclass10
1 files changed, 10 insertions, 0 deletions
diff --git a/classes/meta-virt-container-cfg.bbclass b/classes/meta-virt-container-cfg.bbclass
new file mode 100644
index 00000000..9a4b144e
--- /dev/null
+++ b/classes/meta-virt-container-cfg.bbclass
@@ -0,0 +1,10 @@
+# We need to set the Xen meta-virt config components, only if "xen"
+# is in the distro features. Since we don't know the distro flags during
+# layer.conf load time, we delay using a special bbclass that simply includes
+# the META_VIRT_CONTAINER_CONFIG_PATH file.
+
+# the defaults are valid if we do or don't have virtualization enabled, so
+# we include it in either case below. But we leave the pattern in place, to
+# match the other configs of the layer and in case the above statement isn't
+# always true in the future.
+include ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', '${META_VIRT_CONTAINER_CONFIG_PATH}', '${META_VIRT_CONTAINER_CONFIG_PATH}', d)}