From: "Yu, Mingli" <mingli.yu@windriver.com>
To: Bruce Ashfield <bruce.ashfield@gmail.com>
Cc: meta-virtualization@yoctoproject.org
Subject: Re: [meta-openstack][PATCH 1/3] sanity-meta-openstack.bbclass: add class for bbappend files checking
Date: Fri, 12 Oct 2018 15:07:10 +0800 [thread overview]
Message-ID: <5BC0481E.2010603@windriver.com> (raw)
In-Reply-To: <CADkTA4MrEE+TgU9Mb=jFXKk6sPkS=8-UYTm3XnWSde36rZG80w@mail.gmail.com>
On 2018年10月12日 02:47, Bruce Ashfield wrote:
> merged.
>
> Note: this doesn't apply to my meta-openstack layer. So it was based
> on some version that I don't have. But since the change was simple
> enough, I resolved the issue and did the merge.
Thanks Bruce!
>
> Bruce
> On Wed, Oct 10, 2018 at 11:50 PM <mingli.yu@windriver.com> wrote:
>>
>> From: Mingli Yu <Mingli.Yu@windriver.com>
>>
>> Add a new class sanity-meta-openstack.bbclass,
>> to check whether necessary settings are available
>> for bbappend files and preferred version setting
>> in this layer to be effective and warn users if not.
>>
>> In addition, a variable SKIP_SANITY_META_OPENSTACK_CHECK
>> is added to enable users to explicitly skip the
>> checking to avoid unwanted warnings.
>>
>> Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
>> ---
>> meta-openstack/README | 19 +++++++++++++++++++
>> meta-openstack/classes/sanity-meta-openstack.bbclass | 10 ++++++++++
>> meta-openstack/conf/layer.conf | 4 ++++
>> 3 files changed, 33 insertions(+)
>> create mode 100644 meta-openstack/classes/sanity-meta-openstack.bbclass
>>
>> diff --git a/meta-openstack/README b/meta-openstack/README
>> index 81b843b..8506250 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 0000000..3d5e57b
>> --- /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 126f37f..f322bcd 100644
>> --- a/meta-openstack/conf/layer.conf
>> +++ b/meta-openstack/conf/layer.conf
>> @@ -35,5 +35,9 @@ 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"
>> LAYERRECOMMENDS_openstack-layer = "meta-openstack-dl (= 2.6)"
>> --
>> 2.7.4
>>
>
>
prev parent reply other threads:[~2018-10-12 7:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-11 3:50 [meta-openstack][PATCH 1/3] sanity-meta-openstack.bbclass: add class for bbappend files checking mingli.yu
2018-10-11 3:50 ` [meta-openstack][PATCH v2 2/3] layer.conf: set PREFERRED_VERSION for python-networkx mingli.yu
2018-10-11 18:47 ` Bruce Ashfield
2018-10-11 3:50 ` [meta-openstack][PATCH 3/3] postgresql: make append version independent mingli.yu
2018-10-11 18:47 ` Bruce Ashfield
2018-10-11 18:47 ` [meta-openstack][PATCH 1/3] sanity-meta-openstack.bbclass: add class for bbappend files checking Bruce Ashfield
2018-10-12 7:07 ` Yu, Mingli [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5BC0481E.2010603@windriver.com \
--to=mingli.yu@windriver.com \
--cc=bruce.ashfield@gmail.com \
--cc=meta-virtualization@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.