Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] oe-setup-builddir: substitute ##OEROOT## when using templates
@ 2013-08-08 14:14 Ross Burton
  2013-08-08 14:41 ` Gary Thomas
  0 siblings, 1 reply; 3+ messages in thread
From: Ross Burton @ 2013-08-08 14:14 UTC (permalink / raw)
  To: openembedded-core

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(-)

diff --git a/scripts/oe-setup-builddir b/scripts/oe-setup-builddir
index d5d8d98..d5bd581 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
-- 
1.7.10.4



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

* Re: [PATCH] oe-setup-builddir: substitute ##OEROOT## when using templates
  2013-08-08 14:14 [PATCH] oe-setup-builddir: substitute ##OEROOT## when using templates Ross Burton
@ 2013-08-08 14:41 ` Gary Thomas
  2013-08-08 14:44   ` Burton, Ross
  0 siblings, 1 reply; 3+ messages in thread
From: Gary Thomas @ 2013-08-08 14:41 UTC (permalink / raw)
  To: openembedded-core

On 2013-08-08 08:14, 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
>
> 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..d5bd581 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.
          ^^
Should these be here?

> +    sed -i -e "s|##COREBASE##|$OEROOT|g" $BUILDDIR/conf/bblayers.conf
>   fi
>
>   # Prevent disturbing a new GIT clone in same console
>

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


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

* Re: [PATCH] oe-setup-builddir: substitute ##OEROOT## when using templates
  2013-08-08 14:41 ` Gary Thomas
@ 2013-08-08 14:44   ` Burton, Ross
  0 siblings, 0 replies; 3+ messages in thread
From: Burton, Ross @ 2013-08-08 14:44 UTC (permalink / raw)
  To: Gary Thomas; +Cc: openembedded-core

On 8 August 2013 15:41, Gary Thomas <gary@mlbassoc.com> wrote:
> Should these be here?

No, that would be emacs being "clever".

Ross


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

end of thread, other threads:[~2013-08-08 14:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-08 14:14 [PATCH] oe-setup-builddir: substitute ##OEROOT## when using templates Ross Burton
2013-08-08 14:41 ` Gary Thomas
2013-08-08 14:44   ` Burton, Ross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox