[bitbake-devel] [OE-core] PLEASE READ: Major change landing shortly (python whitespace)

Richard Purdie richard.purdie at linuxfoundation.org
Thu Jul 19 10:15:48 UTC 2012


On Thu, 2012-07-19 at 11:49 +0200, Martin Jansa wrote:
> On Wed, Jul 18, 2012 at 12:40:18PM +0100, Richard Purdie wrote:
> > On Wed, 2012-07-18 at 11:17 +0100, Burton, Ross wrote:
> > > On 18 July 2012 11:06, Richard Purdie
> > > <richard.purdie at linuxfoundation.org> wrote:
> > > > I put a proposal to the TSC, that we have bitbake warn/error whenever it
> > > > finds tab characters in any python function. The advantage of this is
> > > > that we give the user a clear definitive error. The downside is that
> > > > we'll have to go through all the metadata and scrub it for the problem.
> > > 
> > > Have you ran that warning over oe-core to check that there are not any
> > > legitimate uses of \t, not for indentation but inside strings?  I
> > > can't think of any realistic use but you never know (construct a
> > > Makefile in a python function?).
> > 
> > The check is for actual tab characters, not "\t". There are some
> > legitimate users of tab characters which I've replaced with \t in
> > strings.
> > 
> > My current patch work in progress for the conversion is:
> > 
> > http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=rpurdie/t14&id=49d3d01f3d61a0eb19b6852229fa8fc26712f653
> 
> from those 2 patches which were just merged I see that you're converting
> strictly python functions, can we extend this tabs->spaces rule also to
> bash tasks like do_install etc?

Shell tasks should be tabs according to the style guide. Its harder to
check the indentation in those and if the indentation is wrong, it
doesn't matter since they're not whitespace sensitive.

So whilst I'd welcome fixing them up, I don't think they need bitbake
enforcing policy in the same way as python functions.

Cheers,

Richard





More information about the bitbake-devel mailing list