]> code.ossystems Code Review - openembedded-core.git/commitdiff
layer.conf: fix syntax error in PATH setting
authorMatt Madison <matt@madison.systems>
Thu, 12 Nov 2020 14:51:41 +0000 (06:51 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 13 Nov 2020 14:31:56 +0000 (14:31 +0000)
Commit 05a87be51b44608ce4f77ac332df90a3cd2445ef introduced
a Python conditional expression when updating PATH that
generates syntax warnings in bitbake-cookerdaemon.log:

  Var <PATH[:=]>:1: SyntaxWarning: "is not" with a literal. Did you mean "!="?

Fix this by using the more appropriate '!=' comparison
operator.

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/conf/layer.conf

index 2d9cd056958a574b53dce88e2521f370c8730f29..cda37c33b4b1c80f3e7bf7228664d9d3336da29d 100644 (file)
@@ -104,4 +104,4 @@ SSTATE_EXCLUDEDEPS_SYSROOT += ".*->autoconf-archive-native"
 # We need to keep bitbake tools in PATH
 # Avoid empty path entries
 BITBAKEPATH := "${@os.path.dirname(bb.utils.which(d.getVar('PATH'),'bitbake'))}"
-PATH := "${@'${BITBAKEPATH}:' if '${BITBAKEPATH}' is not '' else ''}${HOSTTOOLS_DIR}"
+PATH := "${@'${BITBAKEPATH}:' if '${BITBAKEPATH}' != '' else ''}${HOSTTOOLS_DIR}"