[OE-core] [PATCH v2 01/25] bitbake.conf: support for merged usr with DISTRO_FEATURE usrmerge

Richard Purdie richard.purdie at linuxfoundation.org
Thu Jun 8 06:37:08 UTC 2017


On Wed, 2017-06-07 at 17:04 +0000, Peter Kjellerstedt wrote:
> > 
> > -----Original Message-----
> > From: openembedded-core-bounces at lists.openembedded.org
> > [mailto:openembedded-core-bounces at lists.openembedded.org] On Behalf
> > Of
> > Patrick Ohly
> > Sent: den 7 juni 2017 16:32
> > To: Richard Purdie <richard.purdie at linuxfoundation.org>
> > Cc: Joshua Lock <joshua.g.lock at intel.com>; openembedded-
> > core at lists.openembedded.org
> > Subject: Re: [OE-core] [PATCH v2 01/25] bitbake.conf: support for
> > merged usr with DISTRO_FEATURE usrmerge
> > 
> > On Wed, 2017-06-07 at 12:52 +0100, Richard Purdie wrote:
> > > 
> > > On Wed, 2017-02-22 at 10:26 +0200, Amarnath Valluri wrote:
> > > > 
> > > > From: Joshua Lock <joshua.g.lock at intel.com>
> > > > 
> > > > Modify bindir, libdir and sbindir to be exec_prefix/$d, rather
> > > > than
> > > > base_prefix/$d, when the usrmerge DISTRO_FEATURE is enabled.
> > > > 
> > > > Signed-off-by: Joshua Lock <joshua.g.lock at intel.com>
> > > > ---
> > > >  meta/conf/bitbake.conf | 12 ++++++++----
> > > >  1 file changed, 8 insertions(+), 4 deletions(-)
> > > I was asked to clarify the status of this series. We've taken
> > > many of
> > > the changes but the core changes to bitbake.conf haven't been
> > > merged.
> > > 
> > > Ross/I discussed it and we both feel that the bitbake.conf make
> > > the
> > > file pretty unreadable. We'd therefore like to see this
> > > implemented
> > > as a .inc file which gets included when the relevant
> > > DISTRO_FEATURE 
> > > is set (or could just be included by the appropriate distro
> > > configs). 
> > > This .inc file would then simply override the paths. I believe
> > > this 
> > > would be a lot more readable than the current approach which is
> > > a 
> > > key concern in the core config.
> I actually suggested an alternative change to bitbake.conf in the
> GitHub 
> review that changes bitbake.conf to take usrmerge into account:
> 
> https://github.com/avalluri/openembedded-core/commit/1655a93238902a88
> 3052a55d88ae14dd02243530
> 
> I will include my suggested solution here since I will refer to it 
> below:
> 
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index 0f27e92e96..305eaff583 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -17,11 +17,13 @@ export base_prefix = ""
>  export prefix = "/usr"
>  export exec_prefix = "${prefix}"
>  
> +root_prefix = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge',
> '${exec_prefix}', '${base_prefix}', d)}"
> +
>  # Base paths
> -export base_bindir = "${base_prefix}/bin"
> -export base_sbindir = "${base_prefix}/sbin"
> -export base_libdir = "${base_prefix}/${baselib}"
> -export nonarch_base_libdir = "${base_prefix}/lib"
> +export base_bindir = "${root_prefix}/bin"
> +export base_sbindir = "${root_prefix}/sbin"
> +export base_libdir = "${root_prefix}/${baselib}"
> +export nonarch_base_libdir = "${root_prefix}/lib"
>  
>  # Architecture independent paths
>  export sysconfdir = "${base_prefix}/etc"
> 
> I think that better maintains the readability of the bitbake.conf
> file, 
> while making the $root_prefix variable available as it can be useful
> in 
> its own (e.g., in the systemd recipe).

Agreed, I'm happier with this and can probably accept a single
DISTO_FEATURES line without the .inc stuff...

Cheers,

Richard



More information about the Openembedded-core mailing list