* [PATCH] cross.bbclass: Preserve the bitbake configuration
@ 2017-05-05 12:03 Amarnath Valluri
2017-05-05 13:10 ` Richard Purdie
0 siblings, 1 reply; 3+ messages in thread
From: Amarnath Valluri @ 2017-05-05 12:03 UTC (permalink / raw)
To: openembedded-core
While preparing target_libdir and target_base_libdir we should preserve the
bitbake configuration used for 'base_libdir' and 'libdir' instead of assuming
${base|exec}_prefix/${baselib}, which is not true in case of merged '/usr'.
Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
---
meta/classes/cross.bbclass | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/meta/classes/cross.bbclass b/meta/classes/cross.bbclass
index 8757303..0195b26 100644
--- a/meta/classes/cross.bbclass
+++ b/meta/classes/cross.bbclass
@@ -53,8 +53,10 @@ SSTATE_SCAN_CMD ?= "${SSTATE_SCAN_CMD_NATIVE}"
target_base_prefix := "${base_prefix}"
target_prefix := "${prefix}"
target_exec_prefix := "${exec_prefix}"
-target_base_libdir = "${target_base_prefix}/${baselib}"
-target_libdir = "${target_exec_prefix}/${baselib}"
+base_libdir_suffix := "${@base_libdir.split(base_prefix)[1] if base_prefix != "" else base_libdir}"
+libdir_suffix := "${@libdir.split(exec_prefix)[1] if exec_prefix != "" else libdir}"
+target_base_libdir = "${target_base_prefix}${base_libdir_suffix}"
+target_libdir = "${target_exec_prefix}${libdir_suffix}"
target_includedir := "${includedir}"
# Overrides for paths
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] cross.bbclass: Preserve the bitbake configuration
2017-05-05 12:03 [PATCH] cross.bbclass: Preserve the bitbake configuration Amarnath Valluri
@ 2017-05-05 13:10 ` Richard Purdie
2017-05-07 18:45 ` Valluri, Amarnath
0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2017-05-05 13:10 UTC (permalink / raw)
To: Amarnath Valluri, openembedded-core
On Fri, 2017-05-05 at 15:03 +0300, Amarnath Valluri wrote:
> While preparing target_libdir and target_base_libdir we should
> preserve the
> bitbake configuration used for 'base_libdir' and 'libdir' instead of
> assuming
> ${base|exec}_prefix/${baselib}, which is not true in case of merged
> '/usr'.
>
> Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
> ---
> meta/classes/cross.bbclass | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/cross.bbclass b/meta/classes/cross.bbclass
> index 8757303..0195b26 100644
> --- a/meta/classes/cross.bbclass
> +++ b/meta/classes/cross.bbclass
> @@ -53,8 +53,10 @@ SSTATE_SCAN_CMD ?= "${SSTATE_SCAN_CMD_NATIVE}"
> target_base_prefix := "${base_prefix}"
> target_prefix := "${prefix}"
> target_exec_prefix := "${exec_prefix}"
> -target_base_libdir = "${target_base_prefix}/${baselib}"
> -target_libdir = "${target_exec_prefix}/${baselib}"
> +base_libdir_suffix := "${@base_libdir.split(base_prefix)[1] if
> base_prefix != "" else base_libdir}"
> +libdir_suffix := "${@libdir.split(exec_prefix)[1] if exec_prefix !=
> "" else libdir}"
> +target_base_libdir = "${target_base_prefix}${base_libdir_suffix}"
> +target_libdir = "${target_exec_prefix}${libdir_suffix}"
> target_includedir := "${includedir}"
I think both Ross and myself have fairly strong reservations about
making core class files practically unreadable in pursuit of this
"merged usr" goal.
Why can't you simply add a conf/distro/include/mergedusr.inc which does
something like:
target_base_libdir_class-cross = "xxx"
?
You'd then have a single include file which anyone wanting to do this
can select rather than complicating files which really don't need more
complication.
Cheers,
Richard
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] cross.bbclass: Preserve the bitbake configuration
2017-05-05 13:10 ` Richard Purdie
@ 2017-05-07 18:45 ` Valluri, Amarnath
0 siblings, 0 replies; 3+ messages in thread
From: Valluri, Amarnath @ 2017-05-07 18:45 UTC (permalink / raw)
To: Richard Purdie, openembedded-core@lists.openembedded.org
> -----Original Message-----
> From: Richard Purdie [mailto:richard.purdie@linuxfoundation.org]
> Sent: Friday, May 5, 2017 4:10 PM
> To: Valluri, Amarnath <amarnath.valluri@intel.com>; openembedded-
> core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH] cross.bbclass: Preserve the bitbake
> configuration
>
> On Fri, 2017-05-05 at 15:03 +0300, Amarnath Valluri wrote:
> > While preparing target_libdir and target_base_libdir we should
> > preserve the bitbake configuration used for 'base_libdir' and 'libdir'
> > instead of assuming ${base|exec}_prefix/${baselib}, which is not true
> > in case of merged '/usr'.
> >
> > Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
> > ---
> > meta/classes/cross.bbclass | 6 ++++--
> > 1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/meta/classes/cross.bbclass b/meta/classes/cross.bbclass
> > index 8757303..0195b26 100644
> > --- a/meta/classes/cross.bbclass
> > +++ b/meta/classes/cross.bbclass
> > @@ -53,8 +53,10 @@ SSTATE_SCAN_CMD ?=
> "${SSTATE_SCAN_CMD_NATIVE}"
> > target_base_prefix := "${base_prefix}"
> > target_prefix := "${prefix}"
> > target_exec_prefix := "${exec_prefix}"
> > -target_base_libdir = "${target_base_prefix}/${baselib}"
> > -target_libdir = "${target_exec_prefix}/${baselib}"
> > +base_libdir_suffix := "${@base_libdir.split(base_prefix)[1] if
> > base_prefix != "" else base_libdir}"
> > +libdir_suffix := "${@libdir.split(exec_prefix)[1] if exec_prefix !=
> > "" else libdir}"
> > +target_base_libdir = "${target_base_prefix}${base_libdir_suffix}"
> > +target_libdir = "${target_exec_prefix}${libdir_suffix}"
> > target_includedir := "${includedir}"
>
> I think both Ross and myself have fairly strong reservations about making
> core class files practically unreadable in pursuit of this "merged usr" goal.
>
> Why can't you simply add a conf/distro/include/mergedusr.inc which does
> something like:
>
> target_base_libdir_class-cross = "xxx"
>
> ?
>
> You'd then have a single include file which anyone wanting to do this can
> select rather than complicating files which really don't need more
> complication.
We are using the similar custom configuration for achieving merged /usr, but felt like referring a undocumented class variable(target_base_libdir) in distro configuration is not right.
And this fix is not only limited to merged usr, cross.bbclass is not respecting the modified bitbake configuration(base_libdir).
- Amarnath
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-05-07 18:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-05 12:03 [PATCH] cross.bbclass: Preserve the bitbake configuration Amarnath Valluri
2017-05-05 13:10 ` Richard Purdie
2017-05-07 18:45 ` Valluri, Amarnath
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.