[oe] [PATCH 7/9] kernel.bbclass: simplify "if image" condition
Tom Rini
tom_rini at mentor.com
Wed Jan 26 19:26:08 UTC 2011
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 at 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?
--
Tom Rini
Mentor Graphics Corporation
More information about the Openembedded-devel
mailing list