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

Otavio Salvador otavio.salvador at ossystems.com.br
Thu Nov 2 11:28:00 UTC 2017


On Wed, Nov 1, 2017 at 10:51 PM, Burton, Ross <ross.burton at intel.com> wrote:
> On 1 November 2017 at 22:04, Richard Purdie
> <richard.purdie at linuxfoundation.org> wrote:
>>
>> 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.
>
>
> (a) seems like the right fix here.  At least, that's what I expected to
> happen...

+1


-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750



More information about the Openembedded-core mailing list