summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-08-03 10:39:00 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-08-04 15:06:38 +0100
commit03ca33e2eb5c242c28834a5f41a379a193ac08e4 (patch)
treeaf12305bf1a3f302710dafd3802815e10730713a /bitbake
parent735e7081be64673977a233fa0f2d20688ae5f381 (diff)
downloadpoky-03ca33e2eb5c242c28834a5f41a379a193ac08e4.tar.gz
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 <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/ui/hob.py2
1 files changed, 1 insertions, 1 deletions
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):
954 954
955 incompatible = server.runCommand(["getVariable", "INCOMPATIBLE_LICENSE"]) 955 incompatible = server.runCommand(["getVariable", "INCOMPATIBLE_LICENSE"])
956 gplv3disabled = False 956 gplv3disabled = False
957 if incompatible and incompatible.lower().find("gplv3"): 957 if incompatible and incompatible.lower().find("gplv3") != -1:
958 gplv3disabled = True 958 gplv3disabled = True
959 959
960 build_toolchain = bool(server.runCommand(["getVariable", "HOB_BUILD_TOOLCHAIN"])) 960 build_toolchain = bool(server.runCommand(["getVariable", "HOB_BUILD_TOOLCHAIN"]))