[oe-commits] [meta-openembedded] 31/87: santiy-meta-gnome: add class for bbappend files checking

git at git.openembedded.org git at git.openembedded.org
Mon Mar 12 17:03:50 UTC 2018


This is an automated email from the git hooks/post-receive script.

armin_kuster pushed a commit to branch master-next
in repository meta-openembedded.

commit 05dc31e5461e6a8791bdc0f93ec56d07e08d19e9
Author: Armin Kuster <akuster808 at gmail.com>
AuthorDate: Wed Mar 7 07:15:59 2018 -0800

    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 at gmail.com>
---
 meta-gnome/README                            | 23 +++++++++++++++++++++++
 meta-gnome/classes/sanity-meta-gnome.bbclass | 10 ++++++++++
 meta-gnome/conf/layer.conf                   |  4 ++++
 3 files changed, 37 insertions(+)

diff --git a/meta-gnome/README b/meta-gnome/README
index 0c4fbd2..482f457 100644
--- a/meta-gnome/README
+++ b/meta-gnome/README
@@ -1,3 +1,25 @@
+meta-gnome
+===========
+
+The recipe in this layer needs to have 'x11' in DISTRO_FEATURES 
+to have effect. To enable them, add in configuration file the following line.
+
+  DISTRO_FEATURES_append = " x11"
+
+If meta-gnome is included, but x11 is not enabled as a
+distro feature a warning is printed at parse time:
+
+    You have included the meta-gnome layer, but
+    'x11' has not been enabled in your DISTRO_FEATURES.
+
+If you know what you are doing, this warning can be disabled by setting the following
+variable in your configuration:
+
+  SKIP_META_GNOME_SANITY_CHECK = 1
+
+
+Dependencies
+------------
 This layer depends on:
 
 URI: git://github.com/openembedded/oe-core.git
@@ -14,3 +36,4 @@ When sending single patches, please using something like:
 'git send-email -M -1 --to openembedded-devel at lists.openembedded.org --subject-prefix=meta-gnome][PATCH'
 
 Interim layer maintainer: Martin Jansa <Martin.Jansa at gmail.com>
+
diff --git a/meta-gnome/classes/sanity-meta-gnome.bbclass b/meta-gnome/classes/sanity-meta-gnome.bbclass
new file mode 100644
index 0000000..331ea19
--- /dev/null
+++ b/meta-gnome/classes/sanity-meta-gnome.bbclass
@@ -0,0 +1,10 @@
+addhandler gnome_bbappend_distrocheck
+gnome_bbappend_distrocheck[eventmask] = "bb.event.SanityCheck"
+python gnome_bbappend_distrocheck() {
+    skip_check = e.data.getVar('SKIP_META_GNOME_SANITY_CHECK') == "1"
+    if 'x11' not in e.data.getVar('DISTRO_FEATURES').split() and not skip_check:
+        bb.warn("You have included the meta-gnome layer, but \
+'x11' has not been enabled in your DISTRO_FEATURES. Some bbappend files \
+may not take effect. See the meta-gnome README for details on enabling \
+meta-gnome support.")
+}
diff --git a/meta-gnome/conf/layer.conf b/meta-gnome/conf/layer.conf
index fb89c14..37215a7 100644
--- a/meta-gnome/conf/layer.conf
+++ b/meta-gnome/conf/layer.conf
@@ -13,3 +13,7 @@ BBFILE_PRIORITY_gnome-layer = "7"
 LAYERVERSION_gnome-layer = "1"
 
 LAYERDEPENDS_gnome-layer = "core openembedded-layer networking-layer"
+
+# Sanity check for meta-gnome layer.
+# Setting SKIP_META_GNOME_SANITY_CHECK to "1" would skip the bbappend files check.
+INHERIT += "sanity-meta-gnome"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list