[OE-core] [PATCH] oe-buildenv-internal: Fix finding build directory

Richard Purdie richard.purdie at linuxfoundation.org
Wed Nov 1 22:04:40 UTC 2017


On Tue, 2017-10-31 at 21:25 -0200, Otavio Salvador wrote:
> On Tue, Oct 31, 2017 at 9:16 PM, Burton, Ross <ross.burton at intel.com>
> wrote:
> > 
> > On 21 October 2017 at 13:06, Richard Purdie
> > <richard.purdie at linuxfoundation.org> wrote:
> > > 
> > > diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-
> > > internal
> > > index e6cd141..abc5aff 100755
> > > --- a/scripts/oe-buildenv-internal
> > > +++ b/scripts/oe-buildenv-internal
> > > @@ -105,6 +105,11 @@ fi
> > > 
> > >  BITBAKEDIR=$(readlink -f "$BITBAKEDIR")
> > >  BUILDDIR=$(readlink -f "$BUILDDIR")
> > > +if [ -z "$BBPATH" ]; then
> > > +    BBPATH=$BUILDDIR
> > > +fi
> > > +
> > > +export BBPATH
> > 
> > This breaks the use-case of the user switching between build
> > directories as
> > re-executing oe-init-build-env doesn't change BBPATH.
> I know and that's why I asked for a warning! ;-)

My patch as it stands clearly can't go in.

Our options are:

a) make that codepath unconditional (which may be no bad thing) and 
   use BBPATH
b) use a specific variable for bitbake, the script sets BUILDDIR
c) start allowing the external code to set TOPDIR directly

I think I'm leaning towards a) or possibly c). I don't really like b).
I tried c) locally and its behaving oddly. a) is known to work.

Chris, any thoughts on the original intentions or what we should do
here?

Cheers,

Richard



More information about the Openembedded-core mailing list