summaryrefslogtreecommitdiffstats
path: root/meta-gnome
diff options
context:
space:
mode:
authorArmin Kuster <akuster808@gmail.com>2018-03-07 07:15:59 -0800
committerArmin Kuster <akuster808@gmail.com>2018-03-12 09:59:34 -0700
commit05dc31e5461e6a8791bdc0f93ec56d07e08d19e9 (patch)
tree20f5be01707812b96dbaaf0e7037f902218eaf46 /meta-gnome
parentcf50e1f47d9d4329406c7c8cb8c1cbe9e310367f (diff)
downloadmeta-openembedded-05dc31e5461e6a8791bdc0f93ec56d07e08d19e9.tar.gz
santiy-meta-gnome: add class for bbappend files checking
Idea taken from meta-virt Add a new class, sanity-meta-gnome.bbclass, to check for whether necessary settings are available for bbappend files in this layer to be effective, and warn users if not. In addition, a variable SKIP_SANITY_BBAPPEND_CHECK is added to enable users to explicitly skip the checking to avoid unwanted warnings. Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-gnome')
-rw-r--r--meta-gnome/README23
-rw-r--r--meta-gnome/classes/sanity-meta-gnome.bbclass10
-rw-r--r--meta-gnome/conf/layer.conf4
3 files changed, 37 insertions, 0 deletions
diff --git a/meta-gnome/README b/meta-gnome/README
index 0c4fbd2a5..482f4570b 100644
--- a/meta-gnome/README
+++ b/meta-gnome/README
@@ -1,3 +1,25 @@
1meta-gnome
2===========
3
4The recipe in this layer needs to have 'x11' in DISTRO_FEATURES
5to have effect. To enable them, add in configuration file the following line.
6
7 DISTRO_FEATURES_append = " x11"
8
9If meta-gnome is included, but x11 is not enabled as a
10distro feature a warning is printed at parse time:
11
12 You have included the meta-gnome layer, but
13 'x11' has not been enabled in your DISTRO_FEATURES.
14
15If you know what you are doing, this warning can be disabled by setting the following
16variable in your configuration:
17
18 SKIP_META_GNOME_SANITY_CHECK = 1
19
20
21Dependencies
22------------
1This layer depends on: 23This layer depends on:
2 24
3URI: git://github.com/openembedded/oe-core.git 25URI: git://github.com/openembedded/oe-core.git
@@ -14,3 +36,4 @@ When sending single patches, please using something like:
14'git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix=meta-gnome][PATCH' 36'git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix=meta-gnome][PATCH'
15 37
16Interim layer maintainer: Martin Jansa <Martin.Jansa@gmail.com> 38Interim layer maintainer: Martin Jansa <Martin.Jansa@gmail.com>
39
diff --git a/meta-gnome/classes/sanity-meta-gnome.bbclass b/meta-gnome/classes/sanity-meta-gnome.bbclass
new file mode 100644
index 000000000..331ea193d
--- /dev/null
+++ b/meta-gnome/classes/sanity-meta-gnome.bbclass
@@ -0,0 +1,10 @@
1addhandler gnome_bbappend_distrocheck
2gnome_bbappend_distrocheck[eventmask] = "bb.event.SanityCheck"
3python gnome_bbappend_distrocheck() {
4 skip_check = e.data.getVar('SKIP_META_GNOME_SANITY_CHECK') == "1"
5 if 'x11' not in e.data.getVar('DISTRO_FEATURES').split() and not skip_check:
6 bb.warn("You have included the meta-gnome layer, but \
7'x11' has not been enabled in your DISTRO_FEATURES. Some bbappend files \
8may not take effect. See the meta-gnome README for details on enabling \
9meta-gnome support.")
10}
diff --git a/meta-gnome/conf/layer.conf b/meta-gnome/conf/layer.conf
index fb89c147c..37215a770 100644
--- a/meta-gnome/conf/layer.conf
+++ b/meta-gnome/conf/layer.conf
@@ -13,3 +13,7 @@ BBFILE_PRIORITY_gnome-layer = "7"
13LAYERVERSION_gnome-layer = "1" 13LAYERVERSION_gnome-layer = "1"
14 14
15LAYERDEPENDS_gnome-layer = "core openembedded-layer networking-layer" 15LAYERDEPENDS_gnome-layer = "core openembedded-layer networking-layer"
16
17# Sanity check for meta-gnome layer.
18# Setting SKIP_META_GNOME_SANITY_CHECK to "1" would skip the bbappend files check.
19INHERIT += "sanity-meta-gnome"