All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [OE-core] [PATCH 1/1] oe-buildenv-internal: Support extra settings
  2020-11-12 11:25 ` [PATCH 1/1] " Robert Yang
@ 2020-11-12 11:24   ` Andreas Oberritter
  2020-11-12 11:32     ` Robert Yang
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Oberritter @ 2020-11-12 11:24 UTC (permalink / raw)
  To: Robert Yang; +Cc: openembedded-core

Dear Robert,

On Thu, 12 Nov 2020 19:25:49 +0800
"Robert Yang" <liezhi.yang@windriver.com> wrote:

> This can make it possible to do extra settings such as PATH for other layers,
> for exampole, other layers may also have scripts directories as oe-core, we
> have to run them with path since they are not in PATH, for example, there is a
> tool meta-browser/scripts/firefox-gen-l10n-recipes, we have to use
> /path/to/meta-browser/scripts to run it. Make oe-buildenv-internal check and
> enable $OEROOT/extrasettings, and set a line like the following can fix the
> problem:
> 
> PATH=/relative/to/$OEROOT/meta-browser/scripts:$PATH
> 
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
>  scripts/oe-buildenv-internal | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal
> index ba0a9b44d6..bf84003d72 100755
> --- a/scripts/oe-buildenv-internal
> +++ b/scripts/oe-buildenv-internal
> @@ -98,6 +98,10 @@ for newpath in "$BITBAKEDIR/bin" "$OEROOT/scripts"; do
>  done
>  unset BITBAKEDIR newpath
>  
> +if [ -e $OEROOT/extrasettings ]; then
> +. $OEROOT/extrasettings
> +fi

I think this filename isn't very descriptive, and people finding this file might wonder what it is about.

How about sourcing all files (maybe with a given suffix like .sh) in $OEROOT/scripts/oe-buildenv-internal.d/ in lexical order?

Regards,
Andreas

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 0/1] oe-buildenv-internal: Support extra settings
@ 2020-11-12 11:25 Robert Yang
  2020-11-12 11:25 ` [PATCH 1/1] " Robert Yang
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Yang @ 2020-11-12 11:25 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 4dce4e01cfa153fb12cfd1684d36e0432bef6741:

  binutils: reproducibility: reuse debug-prefix-map for stabs (2020-11-11 10:08:07 +0000)

are available in the Git repository at:

  git://git.openembedded.org/openembedded-core-contrib rbt/path
  http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/path

Robert Yang (1):
  oe-buildenv-internal: Support extra settings

 scripts/oe-buildenv-internal | 4 ++++
 1 file changed, 4 insertions(+)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/1] oe-buildenv-internal: Support extra settings
  2020-11-12 11:25 [PATCH 0/1] oe-buildenv-internal: Support extra settings Robert Yang
@ 2020-11-12 11:25 ` Robert Yang
  2020-11-12 11:24   ` [OE-core] " Andreas Oberritter
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Yang @ 2020-11-12 11:25 UTC (permalink / raw)
  To: openembedded-core

This can make it possible to do extra settings such as PATH for other layers,
for exampole, other layers may also have scripts directories as oe-core, we
have to run them with path since they are not in PATH, for example, there is a
tool meta-browser/scripts/firefox-gen-l10n-recipes, we have to use
/path/to/meta-browser/scripts to run it. Make oe-buildenv-internal check and
enable $OEROOT/extrasettings, and set a line like the following can fix the
problem:

PATH=/relative/to/$OEROOT/meta-browser/scripts:$PATH

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 scripts/oe-buildenv-internal | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal
index ba0a9b44d6..bf84003d72 100755
--- a/scripts/oe-buildenv-internal
+++ b/scripts/oe-buildenv-internal
@@ -98,6 +98,10 @@ for newpath in "$BITBAKEDIR/bin" "$OEROOT/scripts"; do
 done
 unset BITBAKEDIR newpath
 
+if [ -e $OEROOT/extrasettings ]; then
+. $OEROOT/extrasettings
+fi
+
 # Used by the runqemu script
 export BUILDDIR
 export PATH
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [OE-core] [PATCH 1/1] oe-buildenv-internal: Support extra settings
  2020-11-12 11:24   ` [OE-core] " Andreas Oberritter
@ 2020-11-12 11:32     ` Robert Yang
  2020-11-12 11:47       ` Andreas Oberritter
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Yang @ 2020-11-12 11:32 UTC (permalink / raw)
  To: Andreas Oberritter; +Cc: openembedded-core

Hi Andreas,

On 11/12/20 7:24 PM, Andreas Oberritter wrote:
> Dear Robert,
> 
> On Thu, 12 Nov 2020 19:25:49 +0800
> "Robert Yang" <liezhi.yang@windriver.com> wrote:
> 
>> This can make it possible to do extra settings such as PATH for other layers,
>> for exampole, other layers may also have scripts directories as oe-core, we
>> have to run them with path since they are not in PATH, for example, there is a
>> tool meta-browser/scripts/firefox-gen-l10n-recipes, we have to use
>> /path/to/meta-browser/scripts to run it. Make oe-buildenv-internal check and
>> enable $OEROOT/extrasettings, and set a line like the following can fix the
>> problem:
>>
>> PATH=/relative/to/$OEROOT/meta-browser/scripts:$PATH
>>
>> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
>> ---
>>   scripts/oe-buildenv-internal | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal
>> index ba0a9b44d6..bf84003d72 100755
>> --- a/scripts/oe-buildenv-internal
>> +++ b/scripts/oe-buildenv-internal
>> @@ -98,6 +98,10 @@ for newpath in "$BITBAKEDIR/bin" "$OEROOT/scripts"; do
>>   done
>>   unset BITBAKEDIR newpath
>>   
>> +if [ -e $OEROOT/extrasettings ]; then
>> +. $OEROOT/extrasettings
>> +fi
> 
> I think this filename isn't very descriptive, and people finding this file might wonder what it is about.

There is no such a file by default, the file should be created by other layers
or people out of oe-core.

> 
> How about sourcing all files (maybe with a given suffix like .sh) in $OEROOT/scripts/oe-buildenv-internal.d/ in lexical order?

If we do this, people need to patch oe-core/scripts/oe-buildenv-internal.d/ to
add their own settings, and oe-core can't accept such customization patches,
then it would make their oe-core repo non-fastword because of the local patches,
so I'm afraid that we can't do this.

// Robert

> 
> Regards,
> Andreas
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core] [PATCH 1/1] oe-buildenv-internal: Support extra settings
  2020-11-12 11:32     ` Robert Yang
@ 2020-11-12 11:47       ` Andreas Oberritter
  2020-11-12 12:05         ` Robert Yang
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Oberritter @ 2020-11-12 11:47 UTC (permalink / raw)
  To: Robert Yang; +Cc: openembedded-core

On Thu, 12 Nov 2020 19:32:59 +0800
Robert Yang <liezhi.yang@windriver.com> wrote:

> Hi Andreas,
> 
> On 11/12/20 7:24 PM, Andreas Oberritter wrote:
> > Dear Robert,
> > 
> > On Thu, 12 Nov 2020 19:25:49 +0800
> > "Robert Yang" <liezhi.yang@windriver.com> wrote:
> > 
> >> This can make it possible to do extra settings such as PATH for other layers,
> >> for exampole, other layers may also have scripts directories as oe-core, we
> >> have to run them with path since they are not in PATH, for example, there is a
> >> tool meta-browser/scripts/firefox-gen-l10n-recipes, we have to use
> >> /path/to/meta-browser/scripts to run it. Make oe-buildenv-internal check and
> >> enable $OEROOT/extrasettings, and set a line like the following can fix the
> >> problem:
> >>
> >> PATH=/relative/to/$OEROOT/meta-browser/scripts:$PATH
> >>
> >> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> >> ---
> >>   scripts/oe-buildenv-internal | 4 ++++
> >>   1 file changed, 4 insertions(+)
> >>
> >> diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal
> >> index ba0a9b44d6..bf84003d72 100755
> >> --- a/scripts/oe-buildenv-internal
> >> +++ b/scripts/oe-buildenv-internal
> >> @@ -98,6 +98,10 @@ for newpath in "$BITBAKEDIR/bin" "$OEROOT/scripts"; do
> >>   done
> >>   unset BITBAKEDIR newpath
> >>   
> >> +if [ -e $OEROOT/extrasettings ]; then
> >> +. $OEROOT/extrasettings
> >> +fi
> > 
> > I think this filename isn't very descriptive, and people finding this file might wonder what it is about.
> 
> There is no such a file by default, the file should be created by other layers
> or people out of oe-core.
> 
> > 
> > How about sourcing all files (maybe with a given suffix like .sh) in $OEROOT/scripts/oe-buildenv-internal.d/ in lexical order?
> 
> If we do this, people need to patch oe-core/scripts/oe-buildenv-internal.d/ to
> add their own settings, and oe-core can't accept such customization patches,
> then it would make their oe-core repo non-fastword because of the local patches,
> so I'm afraid that we can't do this.

The same restrictions apply to $OEROOT/extrasettings.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core] [PATCH 1/1] oe-buildenv-internal: Support extra settings
  2020-11-12 11:47       ` Andreas Oberritter
@ 2020-11-12 12:05         ` Robert Yang
  0 siblings, 0 replies; 6+ messages in thread
From: Robert Yang @ 2020-11-12 12:05 UTC (permalink / raw)
  To: Andreas Oberritter; +Cc: openembedded-core



On 11/12/20 7:47 PM, Andreas Oberritter wrote:
> On Thu, 12 Nov 2020 19:32:59 +0800
> Robert Yang <liezhi.yang@windriver.com> wrote:
> 
>> Hi Andreas,
>>
>> On 11/12/20 7:24 PM, Andreas Oberritter wrote:
>>> Dear Robert,
>>>
>>> On Thu, 12 Nov 2020 19:25:49 +0800
>>> "Robert Yang" <liezhi.yang@windriver.com> wrote:
>>>
>>>> This can make it possible to do extra settings such as PATH for other layers,
>>>> for exampole, other layers may also have scripts directories as oe-core, we
>>>> have to run them with path since they are not in PATH, for example, there is a
>>>> tool meta-browser/scripts/firefox-gen-l10n-recipes, we have to use
>>>> /path/to/meta-browser/scripts to run it. Make oe-buildenv-internal check and
>>>> enable $OEROOT/extrasettings, and set a line like the following can fix the
>>>> problem:
>>>>
>>>> PATH=/relative/to/$OEROOT/meta-browser/scripts:$PATH
>>>>
>>>> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
>>>> ---
>>>>    scripts/oe-buildenv-internal | 4 ++++
>>>>    1 file changed, 4 insertions(+)
>>>>
>>>> diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal
>>>> index ba0a9b44d6..bf84003d72 100755
>>>> --- a/scripts/oe-buildenv-internal
>>>> +++ b/scripts/oe-buildenv-internal
>>>> @@ -98,6 +98,10 @@ for newpath in "$BITBAKEDIR/bin" "$OEROOT/scripts"; do
>>>>    done
>>>>    unset BITBAKEDIR newpath
>>>>    
>>>> +if [ -e $OEROOT/extrasettings ]; then
>>>> +. $OEROOT/extrasettings
>>>> +fi
>>>
>>> I think this filename isn't very descriptive, and people finding this file might wonder what it is about.
>>
>> There is no such a file by default, the file should be created by other layers
>> or people out of oe-core.
>>
>>>
>>> How about sourcing all files (maybe with a given suffix like .sh) in $OEROOT/scripts/oe-buildenv-internal.d/ in lexical order?
>>
>> If we do this, people need to patch oe-core/scripts/oe-buildenv-internal.d/ to
>> add their own settings, and oe-core can't accept such customization patches,
>> then it would make their oe-core repo non-fastword because of the local patches,
>> so I'm afraid that we can't do this.
> 
> The same restrictions apply to $OEROOT/extrasettings.

There is a slightly different, if make a symlink outside of oe-core
to oe-init-build-env, then the symlink's dir will be used as OEROOT:

if [ -z "$OEROOT" ]; then
     OEROOT=$(dirname "$THIS_SCRIPT")
     OEROOT=$(readlink -f "$OEROOT")
fi

So $OEROOT/extrasettings can be in the symlink's directory which is out of
oe-core, but '$OEROOT/scripts' can't since it conflicts with oe-core/scripts,
another directory such as $OEROOT/oe-buildenv-internal.d/ should work.

// Robert

> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-11-12 12:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-12 11:25 [PATCH 0/1] oe-buildenv-internal: Support extra settings Robert Yang
2020-11-12 11:25 ` [PATCH 1/1] " Robert Yang
2020-11-12 11:24   ` [OE-core] " Andreas Oberritter
2020-11-12 11:32     ` Robert Yang
2020-11-12 11:47       ` Andreas Oberritter
2020-11-12 12:05         ` Robert Yang

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.