[bitbake-devel] [Openembedded-architecture] [PATCH] data_smart: Drop default expand=False to getVar [API change]

Otavio Salvador otavio.salvador at ossystems.com.br
Wed Feb 3 16:43:58 UTC 2016


On Wed, Feb 3, 2016 at 1:06 PM, Martin Jansa <martin.jansa at gmail.com> wrote:
> On Wed, Feb 03, 2016 at 11:22:36AM +0000, Richard Purdie wrote:
>> On Wed, 2016-02-03 at 08:11 -0200, Otavio Salvador wrote:
>> > On Tue, Feb 2, 2016 at 9:55 PM, Richard Purdie
>> > <richard.purdie at linuxfoundation.org> wrote:
>> > > At some point in the future, getVar should expand by default. To
>> > > get
>> > > there from the current position, we need a period of time where the
>> > > expand parameter is mandatory.
>> > >
>> > > This patch starts that process. Clear errors will result from any
>> > > code
>> > > which doesn't provide this. Layers can be fixed with an expression
>> > > like:
>> > >
>> > > sed -e 's:\(\.getVar([^,()]*, [^,()]*\)):\1, False):g' -i `grep
>> > > -ril getVar *`
>> > >
>> > > Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
>> >
>> > I am in favor of making it mandatory but I fail to see what we gain
>> > in making it expand by default in future.
>>
>> Less ugly syntax, in 99.9% of usages, you would want expand=True and
>> getVar("X") is neater than getVar("X", True).
>
> Consistent indentation is also neater than mixing tabs and spaces, but
> you were refusing to take such cosmetic change and now you're proposing
> neater getVar syntax which is (in some cases silently) breaking existing
> metadata and make backporting changes more difficult?
>
> I'm not opposing the change, just don't understand why the same
> arguments work here and not for indentation.

I second Martin's comments here. I would like to see more consistency
applied to the metadata. I know that some people will have conflicts
when rebasing out-of-tree code but this is the price of not
upstreaming code.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750



More information about the bitbake-devel mailing list