From: Mark Hatle <mark.hatle@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH v2] sanity.bbclass: support wildcards in SANITY_TESTED_DISTROS
Date: Mon, 3 Mar 2014 14:13:23 -0600 [thread overview]
Message-ID: <5314E263.3020505@windriver.com> (raw)
In-Reply-To: <CAMKF1sq5C01yFquzWjAUaHDgr30ZFXj-dnujS0XWBWrWHC5YXA@mail.gmail.com>
On 3/3/14, 12:17 PM, Khem Raj wrote:
> On Mon, Mar 3, 2014 at 6:37 AM, Olof Johansson <olof.johansson@axis.com> wrote:
>> With this change, you can use shell like globbing expressions (as
>> supported by Python's fnmatch) for entries in SANITY_TESTED_DISTROS.
>> This makes it possible to say that, e.g. "all Debian 7 Wheezy releases
>> are supported" with the entry "Debian-7.*".
>
> I dont think its a good thing. We should be strict about it as we are.
> otherwise it can end up
> with bigger problems to save few typing words
We (and I know other commercial vendors) are already using patches similar to
this to do exactly the same thing.
I'd hope that a generic mechanism (like this) could be put in place.. and that
oe-core/Yocto Project would choose -not- to use it for their distributions. (To
avoid the exact problems you mention...)
The commercial folks like me can then use it, as we have to deal with the
problems anyway.
--Mark
>>
>> [YOCTO #5265]
>>
>> Signed-off-by: Olof Johansson <olof.johansson@axis.com>
>> ---
>> meta/classes/sanity.bbclass | 13 +++++++++----
>> 1 file changed, 9 insertions(+), 4 deletions(-)
>>
>> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
>> index bae010d..d79db8f 100644
>> --- a/meta/classes/sanity.bbclass
>> +++ b/meta/classes/sanity.bbclass
>> @@ -246,6 +246,8 @@ def check_connectivity(d):
>> return retval
>>
>> def check_supported_distro(sanity_data):
>> + from fnmatch import fnmatch
>> +
>> tested_distros = sanity_data.getVar('SANITY_TESTED_DISTROS', True)
>> if not tested_distros:
>> return
>> @@ -255,12 +257,15 @@ def check_supported_distro(sanity_data):
>> except Exception:
>> distro = None
>>
>> - if distro:
>> - if distro not in [x.strip() for x in tested_distros.split('\\n')]:
>> - bb.warn('Host distribution "%s" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.' % distro)
>> - else:
>> + if not distro:
>> bb.warn('Host distribution could not be determined; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.')
>>
>> + for supported in [x.strip() for x in tested_distros.split('\\n')]:
>> + if fnmatch(distro, supported):
>> + return
>> +
>> + bb.warn('Host distribution "%s" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.' % distro)
>> +
>> # Checks we should only make if MACHINE is set correctly
>> def check_sanity_validmachine(sanity_data):
>> messages = ""
>> --
>> 1.8.5.3
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
next prev parent reply other threads:[~2014-03-03 20:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-03 14:37 [PATCH v2] sanity.bbclass: support wildcards in SANITY_TESTED_DISTROS Olof Johansson
2014-03-03 18:17 ` Khem Raj
2014-03-03 20:13 ` Mark Hatle [this message]
2014-03-03 20:41 ` Khem Raj
2014-03-04 8:37 ` Olof Johansson
2014-03-04 8:56 ` Anders Darander
2014-03-04 10:56 ` Paul Eggleton
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=5314E263.3020505@windriver.com \
--to=mark.hatle@windriver.com \
--cc=openembedded-core@lists.openembedded.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.