diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2017-09-30 11:06:15 +0800 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2017-10-02 09:39:26 -0400 |
commit | bfba140b8353665e1b586c257982c4cb3f496ec3 (patch) | |
tree | 951d3935af0b6ddcaefc2b411868b428a0feb2c1 /classes | |
parent | b7febd5592a69f79cf194d4561eba2f76e504bd8 (diff) | |
download | meta-virtualization-bfba140b8353665e1b586c257982c4cb3f496ec3.tar.gz |
sanity-meta-virt.bbclass: add class for bbappend files checking
Add a new class, sanity-meta-virt.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: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'classes')
-rw-r--r-- | classes/sanity-meta-virt.bbclass | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/classes/sanity-meta-virt.bbclass b/classes/sanity-meta-virt.bbclass new file mode 100644 index 00000000..bd2b7172 --- /dev/null +++ b/classes/sanity-meta-virt.bbclass | |||
@@ -0,0 +1,10 @@ | |||
1 | addhandler virt_bbappend_distrocheck | ||
2 | virt_bbappend_distrocheck[eventmask] = "bb.event.ConfigParsed" | ||
3 | python virt_bbappend_distrocheck() { | ||
4 | skip_check = e.data.getVar('SKIP_SANITY_BBAPPEND_CHECK') == "1" | ||
5 | if 'virtualization' not in e.data.getVar('DISTRO_FEATURES').split() and not skip_check: | ||
6 | bb.warn("You have included the meta-virtualization layer, but \ | ||
7 | 'virtualization' has not been enabled in your DISTRO_FEATURES. Some bbappend files \ | ||
8 | may not take effect. See the meta-virtualization README for details on enabling \ | ||
9 | virtualization support.") | ||
10 | } | ||