All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Andreas Oberritter <obi@opendreambox.org>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH] bitbake: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True)
Date: Sat, 10 Mar 2012 15:31:13 +0000	[thread overview]
Message-ID: <1331393473.7996.1.camel@ted> (raw)
In-Reply-To: <4F54AE8A.2070403@opendreambox.org>

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




      reply	other threads:[~2012-03-10 15:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-04  3:59 [PATCH] bitbake: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True) Richard Purdie
2012-03-05 12:16 ` Andreas Oberritter
2012-03-10 15:31   ` Richard Purdie [this message]

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=1331393473.7996.1.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=obi@opendreambox.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.