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

Richard Purdie richard.purdie at linuxfoundation.org
Wed Jul 18 13:11:14 UTC 2012


On Wed, 2012-07-18 at 12:40 +0200, Martin Jansa wrote:
> On Wed, Jul 18, 2012 at 11:06:45AM +0100, Richard Purdie wrote:
> > It's become clear we have a horrible mixture of whitespace (tabs and
> > space) in python functions. At first glance this sounds trivial but
> > there is a serious problem if pieces of code get mixed together with
> > different whitespace since they may or may not work as intended.
> > 
> > The documented standard for python functions is four space indentation
> > although we have a mixture. Fixing this sounds simple at first, we just
> > go through and change tabs to spaces. The problem comes with _append and
> > _prepend to python functions since both need their whitespace changed at
> > the same time. populate_packages() is the real problem child in that
> > regard but its the less common examples I worry about.
> > 
> > I did some research and we have inconsistencies, even in existing
> > functions since people are editing files and getting confused
> > (understandably).
> > 
> > So the question becomes, how do we get ourselves out of this mess?
> > 
> > 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.
> > 
> > The TSC agrees we should do something about this rather than perpetuate
> > the problem and that this is as good a solution as any of us can come up
> > with. We also agreed that we should do it sooner than later before it
> > gets any later in this release cycle. Putting it off until the next
> > release cycle didn't seem to offer any advantage, we might as well get
> > on with it.
> > 
> > So I am going to:
> > 
> > a) Try and flush through as many pending patches as I can.
> > b) Check in a warning into bitbake master and increase its version
> > c) Require that version in OE-Core
> 
> Great.. this is usefull also for latest change from proto to protocol
> param in fetcher, but please make sure that the svn.py patch I've sent
> yesterday is also in before release..

I was aware of this issue too which was at the back of my mind when I
proposed this. The svn patch is in now.

Cheers,

Richard





More information about the bitbake-devel mailing list