Skip to contentSkip to conversation

oe-buildenv-internal: Support extra settings

PATCH In review Robert Yang 2 participants 6 messages Nov 12, 2020

lore
Share & tools
lore
#0 lore raw

cover oe-buildenv-internal: Support extra settings

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(+)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 oe-buildenv-internal: Support extra settings

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

---
 scripts/oe-buildenv-internal | 4 ++++
 1 file changed, 4 insertions(+)
scripts/oe-buildenv-internal +4 -0
index ba0a9b44d6..bf84003d72 100755
@@ -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
Signature · 1 line
2.17.1
#2 lore raw

Dear Robert,

Quoted 20 lines · On Thu, 12 Nov 2020 19:25:49 +0800 "Robert Yang" <[email protected]>…

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

---
 scripts/oe-buildenv-internal | 4 ++++
 1 file changed, 4 insertions(+)
scripts/oe-buildenv-internal +0 -0
index ba0a9b44d6..bf84003d72 100755

scripts/oe-buildenv-internal for newpath in "$BITBAKEDIR/bin" "$OEROOT/scripts"; do · line 103

Quoted 6 lines
scripts/oe-buildenv-internal +3 -0
@@ -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

#3 lore raw

Hi Andreas,

Quoted 28 lines · Andreas Oberritter

Dear Robert,

Quoted 23 lines · On Thu, 12 Nov 2020 19:25:49 +0800 "Robert Yang" <[email protected]>…

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

---
  scripts/oe-buildenv-internal | 4 ++++
  1 file changed, 4 insertions(+)
scripts/oe-buildenv-internal +0 -0
index ba0a9b44d6..bf84003d72 100755
@@ -98,6 +98,10 @@ for newpath in "$BITBAKEDIR/bin" "$OEROOT/scripts"; do
  done
  unset BITBAKEDIR newpath
 
Quoted 5 lines

scripts/oe-buildenv-internal for newpath in "$BITBAKEDIR/bin" "$OEROOT/scripts"; do · line 103

Quoted 3 lines
scripts/oe-buildenv-internal +3 -0
+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.

Quoted 2 lines

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

Quoted 4 lines

Regards,
Andreas

#4 lore raw
Quoted 41 lines · On Thu, 12 Nov 2020 19:32:59 +0800 Robert Yang <[email protected]>…

Hi Andreas,

Quoted 28 lines · Andreas Oberritter

Dear Robert,

Quoted 23 lines · On Thu, 12 Nov 2020 19:25:49 +0800 "Robert Yang" <[email protected]>…

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

---
  scripts/oe-buildenv-internal | 4 ++++
  1 file changed, 4 insertions(+)
scripts/oe-buildenv-internal +0 -0
index ba0a9b44d6..bf84003d72 100755
@@ -98,6 +98,10 @@ for newpath in "$BITBAKEDIR/bin" "$OEROOT/scripts"; do
  done
  unset BITBAKEDIR newpath
 
Quoted 5 lines

scripts/oe-buildenv-internal for newpath in "$BITBAKEDIR/bin" "$OEROOT/scripts"; do · line 103

Quoted 3 lines
scripts/oe-buildenv-internal +3 -0
+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.

Quoted 1 line
Quoted 6 lines
Quoted 1 line

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.

#5 lore raw
Quoted 44 lines · Andreas Oberritter
Quoted 41 lines · On Thu, 12 Nov 2020 19:32:59 +0800 Robert Yang <[email protected]>…

Hi Andreas,

Quoted 28 lines · Andreas Oberritter

Dear Robert,

Quoted 23 lines · On Thu, 12 Nov 2020 19:25:49 +0800 "Robert Yang" <[email protected]>…

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

---
   scripts/oe-buildenv-internal | 4 ++++
   1 file changed, 4 insertions(+)
scripts/oe-buildenv-internal +0 -0
index ba0a9b44d6..bf84003d72 100755
@@ -98,6 +98,10 @@ for newpath in "$BITBAKEDIR/bin" "$OEROOT/scripts"; do
   done
   unset BITBAKEDIR newpath
 
Quoted 5 lines

scripts/oe-buildenv-internal for newpath in "$BITBAKEDIR/bin" "$OEROOT/scripts"; do · line 103

Quoted 3 lines
scripts/oe-buildenv-internal +3 -0
+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.

Quoted 1 line
Quoted 8 lines
Quoted 6 lines
Quoted 1 line

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

Quoted 1 line