All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [PATCH 7/9] kernel.bbclass: simplify "if image" condition
Date: Wed, 26 Jan 2011 21:29:31 +0100	[thread overview]
Message-ID: <20110126202931.GD714@mx.loc> (raw)
In-Reply-To: <4D407B96.2010801@mentor.com>

On Wed, Jan 26, 2011 at 12:52:54PM -0700, Tom Rini wrote:
>On 01/26/2011 12:26 PM, Tom Rini wrote:
>>On 01/26/2011 11:13 AM, Bernhard Reutner-Fischer wrote:
>>>Anything that expands image to any false value should not set
>>>INITRAMFS_TASK (instead of just "" or None).
>>>
>>>Signed-off-by: Bernhard Reutner-Fischer<rep.dot.nop@gmail.com>
>>>---
>>>classes/kernel.bbclass | 2 +-
>>>1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>>diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass
>>>index ea1daf6..d0608e5 100644
>>>--- a/classes/kernel.bbclass
>>>+++ b/classes/kernel.bbclass
>>>@@ -18,7 +18,7 @@ python __anonymous () {
>>>bb.data.setVar("DEPENDS", depends, d)
>>>
>>>image = bb.data.getVar('INITRAMFS_IMAGE', d, True)
>>>- if image != '' and image is not None:
>>>+ if image:
>>>bb.data.setVar('INITRAMFS_TASK', '${INITRAMFS_IMAGE}:do_rootfs', d)
>>>
>>>machine_kernel_pr = bb.data.getVar('MACHINE_KERNEL_PR', d, True)
>>
>>Er, right below these lines it still does:
>>INITRAMFS_IMAGE ?= ""
>>INITRAMFS_TASK ?= ""
>>
>>Which would be a problem yes? Or is there some pythonism I'm forgetting?
>
>OK, after some quick IRC conversation, my only concern is the message
>wasn't clear to me, but the changes are fine.  Could it be expanded
>to say:
>Remove some checks because <existing message more or less> means they
>aren't necessary?

Remove superfluous checks since testing for any False, None or empty object
yields False in python.

I'll phrase it like this. Thanks!
>
>Acked-by: Tom Rini <tom_rini@mentor.com>
>



  reply	other threads:[~2011-01-26 20:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-26 18:13 [PATCH 0/9] assorted independent pathlets Bernhard Reutner-Fischer
2011-01-26 18:13 ` [PATCH 1/9] fakeroot: add 1.14.5, mv 1.12.4 to obsolete Bernhard Reutner-Fischer
2011-01-26 18:13 ` [PATCH 2/9] packaged-staging.bbclass: improve documentation Bernhard Reutner-Fischer
2011-01-27 11:19   ` Aeschbacher, Fabrice
2011-01-26 18:13 ` [PATCH 3/9] IMAGE_CMD_ext4.xz: rm uncompressed image Bernhard Reutner-Fischer
2011-01-26 19:21   ` Tom Rini
2011-01-26 20:08     ` Bernhard Reutner-Fischer
2011-01-27 14:56       ` Tom Rini
2011-01-26 18:13 ` [PATCH 4/9] micro: get preferred binutils from sane-toolchain Bernhard Reutner-Fischer
2011-01-26 18:13 ` [PATCH 5/9] ltp: bump version Bernhard Reutner-Fischer
2011-01-26 18:13 ` [PATCH 6/9] uclibc: handle some more {machine, distro}_features Bernhard Reutner-Fischer
2011-01-26 18:13 ` [PATCH 7/9] kernel.bbclass: simplify "if image" condition Bernhard Reutner-Fischer
2011-01-26 19:26   ` Tom Rini
2011-01-26 19:52     ` Tom Rini
2011-01-26 20:29       ` Bernhard Reutner-Fischer [this message]
2011-01-26 18:13 ` [PATCH 8/9] image.bbclass: only insert feed uris if ONLINE_PACKAGE_MANAGEMENT Bernhard Reutner-Fischer
2011-01-26 18:13 ` [PATCH 9/9] util-linux: honour largefile distro feature Bernhard Reutner-Fischer
2011-01-26 20:59   ` Khem Raj
2011-01-26 19:27 ` [PATCH 0/9] assorted independent pathlets Tom Rini

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=20110126202931.GD714@mx.loc \
    --to=rep.dot.nop@gmail.com \
    --cc=openembedded-devel@lists.openembedded.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.