layer.conf: fix sanity error for PATH variable in extensible SDK workflow
PATCH 1/1 layer.conf: fix sanity error for PATH variable in extensible SDK workflow
Sanity checker reports following error for the PATH variable, when bitbake -e <recipe> command is run in an extensible SDK workspace.
PATH contains '.', './' or '' (empty element), which will break the build
In case of extensible SDK, PATH variable is formed with two consecutive ':' as bb.utils.which(d.getVar('PATH'),'bitbake') call returns an empty string.
This change adds ':' if BITBAKEPATH is a non empty string.
(From OE-Core rev: 05a87be51b44608ce4f77ac332df90a3cd2445ef)
--- meta/conf/layer.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
meta/conf/layer.conf +3 -1
@@ -102,4 +102,6 @@ SSTATE_EXCLUDEDEPS_SYSROOT += "\ SSTATE_EXCLUDEDEPS_SYSROOT += ".*->autoconf-archive-native" # We need to keep bitbake tools in PATH -PATH := "${@os.path.dirname(bb.utils.which(d.getVar('PATH'),'bitbake'))}:${HOSTTOOLS_DIR}" +# Avoid empty path entries +BITBAKEPATH := "${@os.path.dirname(bb.utils.which(d.getVar('PATH'),'bitbake'))}" +PATH := "${@'${BITBAKEPATH}:' if '${BITBAKEPATH}' is not '' else ''}${HOSTTOOLS_DIR}"
Signature · 7 lines
2.7.4 -- Regards, Sourabh
Quoted 30 lines · Sourabh Banerjee
Sanity checker reports following error for the PATH variable, when bitbake -e <recipe> command is run in an extensible SDK workspace.
PATH contains '.', './' or '' (empty element), which will break the
buildIn case of extensible SDK, PATH variable is formed with two consecutive ':' as bb.utils.which(d.getVar('PATH'),'bitbake') call returns an empty string.
This change adds ':' if BITBAKEPATH is a non empty string.
(From OE-Core rev:
05a87be51b44608ce4f77ac332df90a3cd2445ef)Signed-off-by Sourabh Banerjee <[email protected]>Signed-off-by Richard Purdie <[email protected]>--- meta/conf/layer.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)meta/conf/layer.conf +0
-1@@ -102,4 +102,6 @@ SSTATE_EXCLUDEDEPS_SYSROOT += "\ SSTATE_EXCLUDEDEPS_SYSROOT += ".*->autoconf-archive-native" # We need to keep bitbake tools in PATH -PATH :="${@os.path.dirname(bb.utils.which(d.getVar('PATH'),'bitbake'))}:${HOSTTOOLS_DIR}"
meta/conf/layer.conf +2
-0+# Avoid empty path entries +BITBAKEPATH :=
Quoted 3 lines
"${@os.path.dirname(bb.utils.which(d.getVar('PATH'),'bitbake'))}" +PATH := "${@'${BITBAKEPATH}:' if '${BITBAKEPATH}' is not '' else ''}${HOSTTOOLS_DIR}"
Hi Steve,
This is a backport from from master to Dunfell.
Regards,
Sourabh
Signature · 2 lines
Regards, Sourabh
Quoted 40 lines · Sourabh Banerjee
Quoted 32 lines · Sourabh Banerjee
Sanity checker reports following error for the PATH variable, when bitbake -e <recipe> command is run in an extensible SDK workspace.
PATH contains '.', './' or '' (empty element), which will break the
buildIn case of extensible SDK, PATH variable is formed with two consecutive ':'
as bb.utils.which(d.getVar('PATH'),'bitbake') call returns an empty string.This change adds ':' if BITBAKEPATH is a non empty string.
(From OE-Core rev:
05a87be51b44608ce4f77ac332df90a3cd2445ef)Signed-off-by Sourabh Banerjee <[email protected]>Signed-off-by Richard Purdie <[email protected]>--- meta/conf/layer.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)meta/conf/layer.conf +0
-1@@ -102,4 +102,6 @@ SSTATE_EXCLUDEDEPS_SYSROOT += "\ SSTATE_EXCLUDEDEPS_SYSROOT += ".*->autoconf-archive-native" # We need to keep bitbake tools in PATH -PATH :="${@os.path.dirname(bb.utils.which(d.getVar('PATH'),'bitbake'))}:${HOSTTOOLS_DIR}"
meta/conf/layer.conf +2
-0+# Avoid empty path entries +BITBAKEPATH :=Quoted 3 lines
"${@os.path.dirname(bb.utils.which(d.getVar('PATH'),'bitbake'))}" +PATH := "${@'${BITBAKEPATH}:' if '${BITBAKEPATH}' is not '' else ''}${HOSTTOOLS_DIR}"
Hi Steve,
Quoted 1 line
This is a backport from from master to Dunfell.
Got it. Thanks!
Steve