* [Dunfell][PATCH] layer.conf: fix sanity error for PATH variable in extensible SDK workflow
@ 2021-02-03 16:20 Sourabh Banerjee
2021-02-03 16:24 ` Sourabh Banerjee
0 siblings, 1 reply; 3+ messages in thread
From: Sourabh Banerjee @ 2021-02-03 16:20 UTC (permalink / raw)
To: openembedded-core
Cc: steve, vkraleti, ndeche, himalg, Sourabh Banerjee, Richard Purdie
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)
Signed-off-by: Sourabh Banerjee <sbanerje@codeaurora.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.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 d593492..2d9cd05 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}"
--
2.7.4
--
Regards,
Sourabh
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Dunfell][PATCH] layer.conf: fix sanity error for PATH variable in extensible SDK workflow
2021-02-03 16:20 [Dunfell][PATCH] layer.conf: fix sanity error for PATH variable in extensible SDK workflow Sourabh Banerjee
@ 2021-02-03 16:24 ` Sourabh Banerjee
2021-02-03 16:33 ` [OE-core] " Steve Sakoman
0 siblings, 1 reply; 3+ messages in thread
From: Sourabh Banerjee @ 2021-02-03 16:24 UTC (permalink / raw)
To: openembedded-core, steve; +Cc: vkraleti, ndeche, himalg, Richard Purdie
On 2021-02-03 21:50, Sourabh Banerjee wrote:
> 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)
>
> Signed-off-by: Sourabh Banerjee <sbanerje@codeaurora.org>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.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 d593492..2d9cd05 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}"
Hi Steve,
This is a backport from from master to Dunfell.
Regards,
Sourabh
--
Regards,
Sourabh
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [OE-core] [Dunfell][PATCH] layer.conf: fix sanity error for PATH variable in extensible SDK workflow
2021-02-03 16:24 ` Sourabh Banerjee
@ 2021-02-03 16:33 ` Steve Sakoman
0 siblings, 0 replies; 3+ messages in thread
From: Steve Sakoman @ 2021-02-03 16:33 UTC (permalink / raw)
To: Sourabh Banerjee
Cc: Patches and discussions about the oe-core layer, vkraleti, ndeche,
himalg, Richard Purdie
On Wed, Feb 3, 2021 at 6:24 AM Sourabh Banerjee <sbanerje@codeaurora.org> wrote:
>
> On 2021-02-03 21:50, Sourabh Banerjee wrote:
> > 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)
> >
> > Signed-off-by: Sourabh Banerjee <sbanerje@codeaurora.org>
> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.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 d593492..2d9cd05 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}"
>
> Hi Steve,
>
> This is a backport from from master to Dunfell.
Got it. Thanks!
Steve
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-02-03 16:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-03 16:20 [Dunfell][PATCH] layer.conf: fix sanity error for PATH variable in extensible SDK workflow Sourabh Banerjee
2021-02-03 16:24 ` Sourabh Banerjee
2021-02-03 16:33 ` [OE-core] " Steve Sakoman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox