scripts/oe-buildenv-internal: Ensure we detect the SDK/ADT and error out

Submitted by Richard Purdie on Oct. 2, 2012, 1:08 p.m. | Patch ID: 37595


Message ID 1349183293.15753.146.camel@ted
State Accepted
Commit 32cc952460de203f3e5db2646861de2ecc951d66
Headers show

Commit Message

Richard Purdie Oct. 2, 2012, 1:08 p.m.
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 <>

Patch hide | download patch | download mbox

diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal
index 32c0ba0..01fffba 100755
--- a/scripts/oe-buildenv-internal
+++ b/scripts/oe-buildenv-internal
@@ -24,6 +24,11 @@  if [ -z "$OEROOT" ]; then
     return 1
+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
 if [ "x$BDIR" = "x" ]; then
     if [ "x$1" = "x" ]; then