From 03ca33e2eb5c242c28834a5f41a379a193ac08e4 Mon Sep 17 00:00:00 2001 From: Joshua Lock Date: Wed, 3 Aug 2011 10:39:00 -0700 Subject: bb/ui/hob: fix detection of whether GPLv3 is disabled Find returns -1 if the substring isn't found, so checking for the Truthiness of the return value is insufficient. An INCOMPATIBLE_LICENSE value which only includes GPLv3 will cause find to return 0, for example. Fixes [YOCTO #1320] (Bitbake rev: 28c71e63355ca94402a9049b8a07046e7b460026) Signed-off-by: Joshua Lock Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/hob.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bitbake/lib') diff --git a/bitbake/lib/bb/ui/hob.py b/bitbake/lib/bb/ui/hob.py index a770fc289f..5998e6bbf8 100644 --- a/bitbake/lib/bb/ui/hob.py +++ b/bitbake/lib/bb/ui/hob.py @@ -954,7 +954,7 @@ def main (server, eventHandler): incompatible = server.runCommand(["getVariable", "INCOMPATIBLE_LICENSE"]) gplv3disabled = False - if incompatible and incompatible.lower().find("gplv3"): + if incompatible and incompatible.lower().find("gplv3") != -1: gplv3disabled = True build_toolchain = bool(server.runCommand(["getVariable", "HOB_BUILD_TOOLCHAIN"])) -- cgit v1.2.3-54-g00ecf