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>
This commit is contained in:
parent
735e7081be
commit
03ca33e2eb
|
@ -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"]))
|
||||
|
|
Loading…
Reference in New Issue