diff options
-rw-r--r-- | meta-openstack/README | 19 | ||||
-rw-r--r-- | meta-openstack/classes/sanity-meta-openstack.bbclass | 10 | ||||
-rw-r--r-- | meta-openstack/conf/layer.conf | 4 |
3 files changed, 33 insertions, 0 deletions
diff --git a/meta-openstack/README b/meta-openstack/README index 81b843bb..8506250a 100644 --- a/meta-openstack/README +++ b/meta-openstack/README @@ -5,6 +5,25 @@ This layer provides support for building the packages from the OpenStack project The layer contains recipes for the nova, glance, keystone, cinder, quantum, swift and horizon components. +The bbappend files for some recipes (e.g. postgresql) and preferred version setting +(e.g. python-networkx)in this layer need to have 'openstack' in DISTRO_FEATURES to +have effect. To enable them, add in configuration file the following line. + + DISTRO_FEATURES_append = " openstack" + +If meta-openstack is included, but openstack is not enabled as a +distro feature a warning is printed at parse time: + + You have included the meta-openstack layer, but + 'openstack' has not been enabled in your DISTRO_FEATURES. Some bbappend files + and preferred version setting may not take effect. See the meta-openstack README + for details on enabling openstack support. + +If you know what you are doing, this warning can be disabled by setting the following +variable in your configuration: + + SKIP_META_OPENSTACK_SANITY_CHECK = 1 + Dependencies ------------ diff --git a/meta-openstack/classes/sanity-meta-openstack.bbclass b/meta-openstack/classes/sanity-meta-openstack.bbclass new file mode 100644 index 00000000..3d5e57b4 --- /dev/null +++ b/meta-openstack/classes/sanity-meta-openstack.bbclass @@ -0,0 +1,10 @@ +addhandler openstack_bbappend_distrocheck +openstack_bbappend_distrocheck[eventmask] = "bb.event.SanityCheck" +python openstack_bbappend_distrocheck() { + skip_check = e.data.getVar('SKIP_META_OPENSTACK_SANITY_CHECK') == "1" + if 'openstack' not in e.data.getVar('DISTRO_FEATURES').split() and not skip_check: + bb.warn("You have included the meta-openstack layer, but \ +'openstack' has not been enabled in your DISTRO_FEATURES. Some bbappend files \ +and preferred version setting may not take effect. See the meta-openstack README \ +for details on enabling openstack support.") +} diff --git a/meta-openstack/conf/layer.conf b/meta-openstack/conf/layer.conf index 4ce6ea77..9ca806e6 100644 --- a/meta-openstack/conf/layer.conf +++ b/meta-openstack/conf/layer.conf @@ -35,4 +35,8 @@ PREFERRED_VERSION_python-jsonschema = "2.6.0" PREFERRED_VERSION_python-networkx = "1.11" PREFERRED_VERSION_python-oslo.i18n = "3.17.0+gitAUTOINC+f2729cd36f" +# Sanity check for meta-openstack layer. +# Setting SKIP_META_OPENSTACK_SANITY_CHECK to "1" would skip the bbappend files check. +INHERIT += "sanity-meta-openstack" + LICENSE_PATH += "${LAYERDIR}/licenses" |