diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2019-12-06 13:51:57 -0500 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2019-12-06 13:51:57 -0500 |
commit | b4dfe90a5e7a4fd1ac92f8c85ba852f9d28fea74 (patch) | |
tree | f6b9e34ea9d77568a2b70cae98ca1b467746a1a6 | |
parent | 8860257250e85fd6c963bebc0f9004bbd0b27a0b (diff) | |
download | meta-virtualization-b4dfe90a5e7a4fd1ac92f8c85ba852f9d28fea74.tar.gz |
conf: fix meta-virt version / config include
As was reported:
https://lists.yoctoproject.org/g/meta-virtualization/message/4173?p=,,,20,0,0,0::Created,,conf%2Flayer.conf+is+broken,20,2,0,61269733
The conditional include of the meta-virt versions and config was not
working properly due to parse time constraints.
This commit fixes that by following the example of the meta-cube layer
and instead using a user bbclass to load the .inc file after
distro/distro features have been resolved by bitbake.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r-- | classes/meta-virt-cfg.bbclass | 6 | ||||
-rw-r--r-- | conf/layer.conf | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/classes/meta-virt-cfg.bbclass b/classes/meta-virt-cfg.bbclass new file mode 100644 index 00000000..bf63a06f --- /dev/null +++ b/classes/meta-virt-cfg.bbclass | |||
@@ -0,0 +1,6 @@ | |||
1 | # We need to load the meta-virt config components, only if "virtualization" | ||
2 | # is in the distro features. Since we don't know the distro flags during | ||
3 | # layer.conf load time, we delay using a special bbclass that simply includes | ||
4 | # the META_VIRT_CONFIG_PATH file. | ||
5 | |||
6 | include ${META_VIRT_CONFIG_PATH} \ No newline at end of file | ||
diff --git a/conf/layer.conf b/conf/layer.conf index dfca6dac..89e5ac2b 100644 --- a/conf/layer.conf +++ b/conf/layer.conf | |||
@@ -40,4 +40,9 @@ PREFERRED_PROVIDER_virtual/docker ?= "docker-ce" | |||
40 | # Setting SKIP_META_VIRT_SANITY_CHECK to "1" would skip the bbappend files check. | 40 | # Setting SKIP_META_VIRT_SANITY_CHECK to "1" would skip the bbappend files check. |
41 | INHERIT += "sanity-meta-virt" | 41 | INHERIT += "sanity-meta-virt" |
42 | 42 | ||
43 | require ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', 'meta-virt-default-versions.inc', '', d)} | 43 | # We need to load the meta-virt config components, only if "virtualization" |
44 | # is in the distro features. Since we don't know the distro flags during | ||
45 | # layer.conf load time, we delay using a special bbclass that simply includes | ||
46 | # the META_VIRT_CONFIG_PATH file. | ||
47 | META_VIRT_CONFIG_PATH = "${LAYERDIR}/conf/distro/include/meta-virt-default-versions.inc" | ||
48 | USER_CLASSES_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', 'meta-virt-cfg', '', d)}" \ No newline at end of file | ||