All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: bitbake-devel <bitbake-devel@lists.openembedded.org>,
	Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] PLEASE READ: Major change landing shortly (python whitespace)
Date: Thu, 19 Jul 2012 13:18:12 +0200	[thread overview]
Message-ID: <20120719111812.GH3331@jama.jama.net> (raw)
In-Reply-To: <1342692948.7940.4.camel@ted>

[-- Attachment #1: Type: text/plain, Size: 2396 bytes --]

On Thu, Jul 19, 2012 at 11:15:48AM +0100, Richard Purdie wrote:
> 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@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.

Agreed about not forcing the check or updating all .bb/.inc files with
this now, but maybe style guide should be updated now?

I really don't like files with mixed indentation (even when it doesn't
hurt) especially with a lot of files not conforming to style guide now,
using even mix of tabs/spaces on the same line..

FWIW: I've prepared patch for whole meta-smartphone to unify that and
I've sent RFC for few bbclasses in meta-oe too.

Cheers,

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Martin Jansa <martin.jansa@gmail.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: bitbake-devel <bitbake-devel@lists.openembedded.org>,
	Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [bitbake-devel] PLEASE READ: Major change landing shortly (python whitespace)
Date: Thu, 19 Jul 2012 13:18:12 +0200	[thread overview]
Message-ID: <20120719111812.GH3331@jama.jama.net> (raw)
In-Reply-To: <1342692948.7940.4.camel@ted>

[-- Attachment #1: Type: text/plain, Size: 2396 bytes --]

On Thu, Jul 19, 2012 at 11:15:48AM +0100, Richard Purdie wrote:
> 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@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.

Agreed about not forcing the check or updating all .bb/.inc files with
this now, but maybe style guide should be updated now?

I really don't like files with mixed indentation (even when it doesn't
hurt) especially with a lot of files not conforming to style guide now,
using even mix of tabs/spaces on the same line..

FWIW: I've prepared patch for whole meta-smartphone to unify that and
I've sent RFC for few bbclasses in meta-oe too.

Cheers,

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

  reply	other threads:[~2012-07-19 11:29 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-18 10:06 PLEASE READ: Major change landing shortly (python whitespace) Richard Purdie
2012-07-18 10:17 ` [OE-core] " Burton, Ross
2012-07-18 10:17   ` Burton, Ross
2012-07-18 11:40   ` [OE-core] " Richard Purdie
2012-07-18 11:40     ` Richard Purdie
2012-07-18 21:43     ` [OE-core] " Martin Jansa
2012-07-18 21:43       ` [bitbake-devel] " Martin Jansa
2012-07-19  8:26       ` [OE-core] " Henning Heinold
2012-07-19  8:26         ` [bitbake-devel] " Henning Heinold
2012-07-19  9:49     ` [OE-core] " Martin Jansa
2012-07-19  9:49       ` [bitbake-devel] " Martin Jansa
2012-07-19 10:15       ` [OE-core] " Richard Purdie
2012-07-19 10:15         ` [bitbake-devel] " Richard Purdie
2012-07-19 11:18         ` Martin Jansa [this message]
2012-07-19 11:18           ` Martin Jansa
2012-07-19 11:27           ` [OE-core] " Martin Jansa
2012-07-19 11:27             ` [bitbake-devel] " Martin Jansa
2012-07-18 10:40 ` Martin Jansa
2012-07-18 10:40   ` [bitbake-devel] " Martin Jansa
2012-07-18 13:11   ` Richard Purdie
2012-07-18 13:11     ` [bitbake-devel] " Richard Purdie
2012-07-19 14:44 ` Jack Mitchell
2012-07-19 15:23   ` Martin Jansa
2012-07-20  9:38     ` Jack Mitchell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120719111812.GH3331@jama.jama.net \
    --to=martin.jansa@gmail.com \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.