[oe] [PATCH] base.bbclass: add 'any' and 'all' functions.
Chris Larson
clarson at kergoth.com
Tue Jan 26 21:17:00 UTC 2010
On Sun, Jan 24, 2010 at 3:48 AM, Holger Hans Peter Freyther <
holger+oe at freyther.de <holger%2Boe at freyther.de>> wrote:
> On Tuesday 19 January 2010 21:01:07 Chris Larson wrote:
> > Python 2.5+ has these functions built-in, but we don't yet require 2.5+.
> >
>
> do we use all/any in the metadata? or is MVista using? If the answer is yes
> then... I'm acking the patch.
>
We don't yet. I've used it in some classes and .inc files in MVL6 that I
plan on pushing to OE. They're much more useful than you'd think. As an
example, I had some code where I had a list of path prefixes which were
allowed, and wanted to check a filename against them:
if any(path.startswith(prefix + "/") for prefix in allowedpaths):
--
Chris Larson
clarson at kergoth dot com
clarson at mvista dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Software Engineer
MontaVista Software, Inc.
More information about the Openembedded-devel
mailing list