[oe] [PATCH] Make use of the new bb.utils.filter() function

Peter Kjellerstedt peter.kjellerstedt at axis.com
Fri Mar 3 10:01:50 UTC 2017


> -----Original Message-----
> From: openembedded-devel-bounces at lists.openembedded.org
> [mailto:openembedded-devel-bounces at lists.openembedded.org] On Behalf Of
> Martin Jansa
> Sent: den 2 mars 2017 21:49
> To: Andreas Müller
> Cc: openembedded-devel at lists.openembedded.org; Peter Kjellerstedt
> Subject: Re: [oe] [PATCH] Make use of the new bb.utils.filter()
> function
> 
> I agree with Andreas, but I'm not opposed to this so strongly.
> 
> Especially as similar patch for oe-core (changing 81 files) was already
> merged. Similarly the getVar cleanup recently will also cause some
> headaches when cherry-picking. Unfortunately my "safe" (as it won't
> break the build) whitespace cleanup won't ever get merged to oe-core, 
> because it's "too intrusive" :/.

Being a big fan of whitespaces cleanups I can understand your 
frustration...

> Someone else with another opinion?
> 
> On Wed, Mar 1, 2017 at 11:02 PM, Andreas Müller <
> schnitzeltony at googlemail.com> wrote:
> 
> > On Wed, Mar 1, 2017 at 6:30 PM, Peter Kjellerstedt
> > <peter.kjellerstedt at axis.com> wrote:
> > > Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
> >
> > TBH: I don't like this patch:
> >
> > * It combines things which do not share same labels by design. Naming
> >   package-configs with same label as distro-feature is a nice to have
> >   but not a design rule.
> > * To me old style explains better what's going on

I guess that is a matter of not being used to the new function. I like 
the fact that in many cases the PACKAGECONFIG definition reduces to as 
single call to bb.utils.filter().

> > * Heavy-gozilla-patches tend to cause headaches when cherry-picking
> >   to older release branches. And yes I know we had these patches in 
> >   the past and nobody complained.

Well, I can split in in 91 individual patches, if that is preferred...

> > Andreas

For the record, here is the sed expression I used to switch to the 
filter function:

sed -ri -e 's/bb.utils.contains\(\s*(.)([^"'\'']*)\1,\s*(.)([^"'\'']*)\3,\s*(.)\4\5,\s*(.)\6/bb.utils.filter(\1\2\1, \3\4\3/g' **/*(.)

(It uses ZSH syntax to find all files, which means bash users would 
have to change it to use find instead.)

//Peter



More information about the Openembedded-devel mailing list