[bitbake-devel] [PATCH] bitbake: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True)

Richard Purdie richard.purdie at linuxfoundation.org
Sat Mar 10 15:31:13 UTC 2012


On Mon, 2012-03-05 at 13:16 +0100, Andreas Oberritter wrote:
> On 04.03.2012 04:59, Richard Purdie wrote:
> > Using "1" with getVar is bad coding style and "True" is preferred.
> 
> Slightly OT, but wouldn't it be more convenient, especially for external
> callers like OE, to make True the default for getVar? This would also
> make getVar somehow more symmetric to setVar.
> 
> A rough, inexact comparison between usage of True vs. False [1]:
> 
> bitbake: 214 times True, 25 times False
> openembedded-core: 1143 times True, 49 times False
> meta-openembedded: 93 times True, 1 time False

It would be convenient but would also change things in a way which would
introduce hard to detect subtle bugs. We're thought about it before and
concluded it would cause too much confusion/breakage.

Cheers,

Richard





More information about the bitbake-devel mailing list