Patchwork Add option to oe-buildenv-internal script to change bitbake location.

login
register
mail settings
Submitter Philip Balister
Date May 9, 2012, 4:44 p.m.
Message ID <1336581863-23833-1-git-send-email-philip@balister.org>
Download mbox | patch
Permalink /patch/27383/
State Accepted
Commit 45510a0dd7a9321c29c5b21ac4053192f7ab9ad5
Headers show

Comments

Philip Balister - May 9, 2012, 4:44 p.m.
Having bitbake inside the oe-core is annoying to some people. This commit
adds a second option to the oe-init-build-env script.

Run like this:

. ./oe-init-build-env ../build ../bitbake

for example. Without the second option, the old behavior is preserved.

Signed-off-by: Philip Balister <philip@balister.org>
---
 scripts/oe-buildenv-internal |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
Marko Lindqvist - May 9, 2012, 5:03 p.m.
On 9 May 2012 19:44, Philip Balister <philip@balister.org> wrote:
> Having bitbake inside the oe-core is annoying to some people. This commit
> adds a second option to the oe-init-build-env script.
>
> Run like this:
>
> . ./oe-init-build-env ../build ../bitbake
>
> for example. Without the second option, the old behavior is preserved.
>
> Signed-off-by: Philip Balister <philip@balister.org>

 Maybe you should update comment in oe-init-build-env describing
typical use to contain this parameter.


 - ML
Saul Wold - May 16, 2012, 6:23 p.m.
On 05/09/2012 07:44 PM, Philip Balister wrote:
> Having bitbake inside the oe-core is annoying to some people. This commit
> adds a second option to the oe-init-build-env script.
>
> Run like this:
>
> . ./oe-init-build-env ../build ../bitbake
>
> for example. Without the second option, the old behavior is preserved.
>
> Signed-off-by: Philip Balister<philip@balister.org>
> ---
>   scripts/oe-buildenv-internal |    6 +++++-
>   1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal
> index 9de7b05..05c6cd8 100755
> --- a/scripts/oe-buildenv-internal
> +++ b/scripts/oe-buildenv-internal
> @@ -54,7 +54,11 @@ else
>   fi
>   unset BDIR
>
> -BITBAKEDIR="$OEROOT/bitbake$BBEXTRA/"
> +if [ "x$2" = "x" ]; then
> +    BITBAKEDIR="$OEROOT/bitbake$BBEXTRA/"
> +else
> +    BITBAKEDIR="$2"
> +fi
>
>   BITBAKEDIR=`readlink -f "$BITBAKEDIR"`
>   BUILDDIR=`readlink -f "$BUILDDIR"`

Merged into OE-Core

Thanks
	Sau!
Philip Balister - May 21, 2012, 1:07 p.m.
On 05/09/2012 01:03 PM, Marko Lindqvist wrote:
> On 9 May 2012 19:44, Philip Balister <philip@balister.org> wrote:
>> Having bitbake inside the oe-core is annoying to some people. This commit
>> adds a second option to the oe-init-build-env script.
>>
>> Run like this:
>>
>> . ./oe-init-build-env ../build ../bitbake
>>
>> for example. Without the second option, the old behavior is preserved.
>>
>> Signed-off-by: Philip Balister <philip@balister.org>
> 
>  Maybe you should update comment in oe-init-build-env describing
> typical use to contain this parameter.

Richard, do you want me to se-send this with Marko's suggestions added?

Philip
Richard Purdie - May 21, 2012, 1:25 p.m.
On Mon, 2012-05-21 at 09:07 -0400, Philip Balister wrote:
> On 05/09/2012 01:03 PM, Marko Lindqvist wrote:
> > On 9 May 2012 19:44, Philip Balister <philip@balister.org> wrote:
> >> Having bitbake inside the oe-core is annoying to some people. This commit
> >> adds a second option to the oe-init-build-env script.
> >>
> >> Run like this:
> >>
> >> . ./oe-init-build-env ../build ../bitbake
> >>
> >> for example. Without the second option, the old behavior is preserved.
> >>
> >> Signed-off-by: Philip Balister <philip@balister.org>
> > 
> >  Maybe you should update comment in oe-init-build-env describing
> > typical use to contain this parameter.
> 
> Richard, do you want me to se-send this with Marko's suggestions added?

I'm happy to have a follow up patch, I did merge the original. It broke
various assumptions being made by for example the autobuilder scripts so
I had to add some other changes already.

Cheers,

Richard
Philip Balister - May 21, 2012, 1:41 p.m.
On 05/21/2012 09:25 AM, Richard Purdie wrote:
> On Mon, 2012-05-21 at 09:07 -0400, Philip Balister wrote:
>> On 05/09/2012 01:03 PM, Marko Lindqvist wrote:
>>> On 9 May 2012 19:44, Philip Balister <philip@balister.org> wrote:
>>>> Having bitbake inside the oe-core is annoying to some people. This commit
>>>> adds a second option to the oe-init-build-env script.
>>>>
>>>> Run like this:
>>>>
>>>> . ./oe-init-build-env ../build ../bitbake
>>>>
>>>> for example. Without the second option, the old behavior is preserved.
>>>>
>>>> Signed-off-by: Philip Balister <philip@balister.org>
>>>
>>>  Maybe you should update comment in oe-init-build-env describing
>>> typical use to contain this parameter.
>>
>> Richard, do you want me to se-send this with Marko's suggestions added?
> 
> I'm happy to have a follow up patch, I did merge the original. It broke
> various assumptions being made by for example the autobuilder scripts so
> I had to add some other changes already.

Thanks.

I'm curious how it could break things since it should not have had any
effect unless a second argument was present.

Philip
Richard Purdie - May 21, 2012, 1:48 p.m.
On Mon, 2012-05-21 at 09:41 -0400, Philip Balister wrote:
> On 05/21/2012 09:25 AM, Richard Purdie wrote:
> > On Mon, 2012-05-21 at 09:07 -0400, Philip Balister wrote:
> >> On 05/09/2012 01:03 PM, Marko Lindqvist wrote:
> >>> On 9 May 2012 19:44, Philip Balister <philip@balister.org> wrote:
> >>>> Having bitbake inside the oe-core is annoying to some people. This commit
> >>>> adds a second option to the oe-init-build-env script.
> >>>>
> >>>> Run like this:
> >>>>
> >>>> . ./oe-init-build-env ../build ../bitbake
> >>>>
> >>>> for example. Without the second option, the old behavior is preserved.
> >>>>
> >>>> Signed-off-by: Philip Balister <philip@balister.org>
> >>>
> >>>  Maybe you should update comment in oe-init-build-env describing
> >>> typical use to contain this parameter.
> >>
> >> Richard, do you want me to se-send this with Marko's suggestions added?
> > 
> > I'm happy to have a follow up patch, I did merge the original. It broke
> > various assumptions being made by for example the autobuilder scripts so
> > I had to add some other changes already.
> 
> Thanks.
> 
> I'm curious how it could break things since it should not have had any
> effect unless a second argument was present.

Think about another script sourcing the internal build environment
script. You'd then see that script's second option...

Cheers,

Richard

Patch

diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal
index 9de7b05..05c6cd8 100755
--- a/scripts/oe-buildenv-internal
+++ b/scripts/oe-buildenv-internal
@@ -54,7 +54,11 @@  else
 fi
 unset BDIR
 
-BITBAKEDIR="$OEROOT/bitbake$BBEXTRA/"
+if [ "x$2" = "x" ]; then
+    BITBAKEDIR="$OEROOT/bitbake$BBEXTRA/"
+else
+    BITBAKEDIR="$2"
+fi
 
 BITBAKEDIR=`readlink -f "$BITBAKEDIR"`
 BUILDDIR=`readlink -f "$BUILDDIR"`