mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-19 12:50:22 +02:00
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>
This commit is contained in:
parent
b7febd5592
commit
bfba140b83
10
classes/sanity-meta-virt.bbclass
Normal file
10
classes/sanity-meta-virt.bbclass
Normal file
|
@ -0,0 +1,10 @@
|
|||
addhandler virt_bbappend_distrocheck
|
||||
virt_bbappend_distrocheck[eventmask] = "bb.event.ConfigParsed"
|
||||
python virt_bbappend_distrocheck() {
|
||||
skip_check = e.data.getVar('SKIP_SANITY_BBAPPEND_CHECK') == "1"
|
||||
if 'virtualization' not in e.data.getVar('DISTRO_FEATURES').split() and not skip_check:
|
||||
bb.warn("You have included the meta-virtualization layer, but \
|
||||
'virtualization' has not been enabled in your DISTRO_FEATURES. Some bbappend files \
|
||||
may not take effect. See the meta-virtualization README for details on enabling \
|
||||
virtualization support.")
|
||||
}
|
|
@ -22,3 +22,7 @@ require conf/distro/include/virt_security_flags.inc
|
|||
|
||||
PREFERRED_PROVIDER_virtual/runc ?= "runc-docker"
|
||||
PREFERRED_PROVIDER_virtual/containerd ?= "containerd-docker"
|
||||
|
||||
# Sanity check for meta-virtualization layer.
|
||||
# Setting SKIP_SANITY_BBAPPEND_CHECK to "1" would skip the bbappend files check.
|
||||
INHERIT += "sanity-meta-virt"
|
||||
|
|
Loading…
Reference in New Issue
Block a user