Patchwork [V3] oe-setup-builddir: substitute ##OEROOT## when using templates

login
register
mail settings
Submitter Ross Burton
Date Aug. 9, 2013, 9:27 a.m.
Message ID <1376040425-2928-1-git-send-email-ross.burton@intel.com>
Download mbox | patch
Permalink /patch/55413/
State Accepted
Commit 1890783928dd1c73105fae32fb6c588afc287ff6
Headers show

Comments

Ross Burton - Aug. 9, 2013, 9:27 a.m.
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

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 scripts/oe-setup-builddir |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Saul Wold - Aug. 9, 2013, 8:58 p.m.
On 08/09/2013 02:27 AM, Ross Burton wrote:
> 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
>
Did you mean for this sentence to just trail off?

Sau!

> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
>   scripts/oe-setup-builddir |    5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/oe-setup-builddir b/scripts/oe-setup-builddir
> index d5d8d98..adb55c7 100755
> --- a/scripts/oe-setup-builddir
> +++ b/scripts/oe-setup-builddir
> @@ -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
>
Ross Burton - Aug. 12, 2013, 10:02 a.m.
On 9 August 2013 21:58, Saul Wold <sgw@linux.intel.com> wrote:
>> To resolve this, deprecate (but still substitute) ##COREBASE## and
>> substitute
>>
> Did you mean for this sentence to just trail off?

The problem with write commit messages with # in is that you're one
paragraph reformat away from lines disappearing...

Ross

Patch

diff --git a/scripts/oe-setup-builddir b/scripts/oe-setup-builddir
index d5d8d98..adb55c7 100755
--- a/scripts/oe-setup-builddir
+++ b/scripts/oe-setup-builddir
@@ -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