]> code.ossystems Code Review - openembedded-core.git/commitdiff
oe-init-env: search 'bitbake' outside of oe-core
authorEnrico Scholz <enrico.scholz@sigma-chemnitz.de>
Tue, 27 Feb 2018 18:46:48 +0000 (19:46 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 1 Mar 2018 22:09:17 +0000 (22:09 +0000)
atm, 'oe-init-build-env' expects 'bitbake' to be within the OE core git
repository.  This complicates the project setup because you have to
manage the 'bitbake' directory or symlink manually (or specify the
bitbake location explicitly).

Looking for 'bitbake' outside the main git repository will ease project
management significantly.  Now, you can put everything into git submodules,
clone the project with

| git clone --recursive ...

and continue immediately with

| ..../oe-init-build-env

E.g. when you had previously

| .
| |-- build/
| `-- sources/
|     `-- org.openembedded.core/
|         `-- bitbake -> ../bitbake

(where 'bitbake' must be created manually after cloning the project),
you can have now

| .
| |-- build/
| `-- sources/
|     |-- bitbake/
|     `-- org.openembedded.core/

which is completely managed by 'git'.

Patch adds $OEROOT/.. to the search path for 'bitbake'

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/oe-buildenv-internal

index 77f98a32b96a4b927b5cc7fc08caf4415d37081f..6773872326144bf5a01168ed6486fb88e5900013 100755 (executable)
@@ -101,6 +101,7 @@ unset BDIR
 
 if [ -z "$BITBAKEDIR" ]; then
     BITBAKEDIR="$OEROOT/bitbake$BBEXTRA"
+    test -d "$BITBAKEDIR" || BITBAKEDIR="$OEROOT/../bitbake$BBEXTRA"
 fi
 
 BITBAKEDIR=$(readlink -f "$BITBAKEDIR")