Skip to contentSkip to conversation

oe-setup-builddir: substitute ##OEROOT## when using templates

PATCH Superseded Ross Burton 2 participants 3 messages Aug 8, 2013

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 oe-setup-builddir: substitute ##OEROOT## when using templates

oe-setup-builddir substitutes ##COREBASE## which seems like it should have the same value as the variable ${COREBASE}. In reality it doesn't as ##COREBASE## is substituted with the value of $OEROOT (the location of the oe-init-build-env script), whereas ${COREBASE} is set by oe-core to the parent directory of meta/. If oe-core's meta/ isn't a top-level directory then ##COREBASE## and ${COREBASE} have different values, which can lead to confusion.

To resolve this, deprecate (but still substitute) ##COREBASE## and substitute

---
 scripts/oe-setup-builddir |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
scripts/oe-setup-builddir +4 -1
index d5d8d98..d5bd581 100755
@@ -101,7 +101,10 @@ EOM
 
     # Put the abosolute path to the layers in bblayers.conf so we can run
     # bitbake without the init script after the first run
-    sed "s|##COREBASE##|$OEROOT|g" $OECORELAYERCONF > $BUILDDIR/conf/bblayers.conf
+    sed "s|##OEROOT##|$OEROOT|g" $OECORELAYERCONF > $BUILDDIR/conf/bblayers.conf
+    # ##COREBASE## is deprecated as it's meaning was inconsistent, but continue
+    # ##to replace it for compatibility.
+    sed -i -e "s|##COREBASE##|$OEROOT|g" $BUILDDIR/conf/bblayers.conf
 fi
 
 # Prevent disturbing a new GIT clone in same console
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 19 lines · Ross Burton

oe-setup-builddir substitutes ##COREBASE## which seems like it should have the same value as the variable ${COREBASE}. In reality it doesn't as ##COREBASE## is substituted with the value of $OEROOT (the location of the oe-init-build-env script), whereas ${COREBASE} is set by oe-core to the parent directory of meta/. If oe-core's meta/ isn't a top-level directory then ##COREBASE## and ${COREBASE} have different values, which can lead to confusion.

To resolve this, deprecate (but still substitute) ##COREBASE## and substitute

---
  scripts/oe-setup-builddir |    5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)
scripts/oe-setup-builddir +0 -0
index d5d8d98..d5bd581 100755

scripts/oe-setup-builddir EOM · line 106

Quoted 7 lines
scripts/oe-setup-builddir +3 -1
@@ -101,7 +101,10 @@ EOM
 
      # Put the abosolute path to the layers in bblayers.conf so we can run
      # bitbake without the init script after the first run
-    sed "s|##COREBASE##|$OEROOT|g" $OECORELAYERCONF > $BUILDDIR/conf/bblayers.conf
+    sed "s|##OEROOT##|$OEROOT|g" $OECORELAYERCONF > $BUILDDIR/conf/bblayers.conf
+    # ##COREBASE## is deprecated as it's meaning was inconsistent, but continue
+    # ##to replace it for compatibility.
         ^^

Should these be here?

Quoted 5 lines
scripts/oe-setup-builddir +1 -0
+    sed -i -e "s|##COREBASE##|$OEROOT|g" $BUILDDIR/conf/bblayers.conf
  fi
 
  # Prevent disturbing a new GIT clone in same console
Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#2 lore raw
Quoted 1 line · Gary Thomas

Should these be here?

No, that would be emacs being "clever".

Ross