All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] layer.conf: fix sanity error for PATH variable in extensible SDK workflow
@ 2020-10-13 16:45 Sourabh Banerjee
  0 siblings, 0 replies; only message in thread
From: Sourabh Banerjee @ 2020-10-13 16:45 UTC (permalink / raw)
  To: openembedded-core; +Cc: 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 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.

Signed-off-by: Sourabh Banerjee <sbanerje@codeaurora.org>
---
 meta/conf/layer.conf | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf
index 38df0f3..9ff5fce 100644
--- a/meta/conf/layer.conf
+++ b/meta/conf/layer.conf
@@ -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}"
-- 
$(echo -e 'The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project')



-- 
Regards,
Sourabh

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-10-13 16:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-13 16:45 [PATCH v3] layer.conf: fix sanity error for PATH variable in extensible SDK workflow Sourabh Banerjee

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.