From 013df5774d243dcbdbded8621c7d4f45a95b86bd Mon Sep 17 00:00:00 2001 From: Simon Desfarges Date: Thu, 19 Feb 2015 15:00:22 +0100 Subject: [PATCH 2/2] toolchain: fix buggy shell behaviour on unbutu after sourcing environment-setup This fixes an issue for end users using the toolchain on ubuntu, when they type an invalid command in the shell. The environment setup script generated with the cross compilation toolchain redefines the PYTHONHOME environment variable to use the local python version. On ubuntu, typing an unknown command in a shell will run the ubuntu-specific command_not_found_handle python script. The problem is that this script is not compatible with the python version shipped with the cross compilation toolchain. Signed-off-by: Fabien Chereau --- meta/classes/toolchain-scripts.bbclass | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass index d5b9675..ae30706 100644 --- a/meta/classes/toolchain-scripts.bbclass +++ b/meta/classes/toolchain-scripts.bbclass @@ -73,6 +73,8 @@ toolchain_shared_env_script () { echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script echo 'export ARCH=${ARCH}' >> $script echo 'export CROSS_COMPILE=${TARGET_PREFIX}' >> $script + echo '' >> $script + echo 'unset command_not_found_handle' >> $script cat >> $script <