]> code.ossystems Code Review - openembedded-core.git/commitdiff
scripts/oe-buildenv-internal: Ensure we detect the SDK/ADT and error out
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 2 Oct 2012 13:08:13 +0000 (14:08 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 2 Oct 2012 16:06:56 +0000 (17:06 +0100)
The SDK/ADT may ship with a python installed which may not have all the modules
need for a bitbake build. We should therefore detect if its already present in the
environment and error out in this case, asking the user to use a clean environment.

This also removes the potential for any other conflict between the two.

[YOCTO #2979]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/oe-buildenv-internal

index 32c0ba02d6202fb1f068f009cb89bd3da773320b..01fffba6259bff4b30f36b73f83a3086e890418b 100755 (executable)
@@ -24,6 +24,11 @@ if [ -z "$OEROOT" ]; then
     return 1
 fi
 
+if [ ! -z "$OECORE_SDK_VERSION" ]; then
+    echo >&2 "Error: The OE SDK/ADT was detected as already being present in this shell environment. Please use a clean shell when sourcing this environment script."
+    return 1
+fi
+
 if [ "x$BDIR" = "x" ]; then
     if [ "x$1" = "x" ]; then
         BDIR="build"