summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorScott Garman <scott.a.garman@intel.com>2012-09-18 22:50:50 -0700
committerSaul Wold <sgw@linux.intel.com>2012-09-20 22:21:14 -0700
commit465d7b6e66b5a55706535e194b3e44e11ee542c6 (patch)
treecbda8982ae7ecbd9dc72ad6107b6cbef5f18cb4e /scripts
parente177f1475c55c7d0bf3e2752e6502a7e8577a075 (diff)
downloadopenembedded-core-465d7b6e66b5a55706535e194b3e44e11ee542c6.tar.gz
openembedded-core-465d7b6e66b5a55706535e194b3e44e11ee542c6.tar.bz2
openembedded-core-465d7b6e66b5a55706535e194b3e44e11ee542c6.zip
runqemu: show bitbake errors to user
In certain edge cases, bitbake may fail to run and cause setup_tmpdir() within runqemu to fail, and not give the user a helpful error message. Catch this case and show the user the output of bitbake -e. This fixes [YOCTO #3112] Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/runqemu12
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index e843946e32..a9f513c7a9 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -283,8 +283,16 @@ setup_tmpdir() {
# We have bitbake in PATH, get OE_TMPDIR from bitbake
OE_TMPDIR=`MACHINE=$MACHINE bitbake -e | grep ^TMPDIR=\" | cut -d '=' -f2 | cut -d '"' -f2`
if [ -z "$OE_TMPDIR" ]; then
- echo "Error: this script needs to be run from your build directory,"
- echo "or you need to explicitly set OE_TMPDIR in your environment"
+ # Check for errors from bitbake that the user needs to know about
+ BITBAKE_OUTPUT=`bitbake -e | wc -l`
+ if [ "$BITBAKE_OUTPUT" -eq "0" ]; then
+ echo "Error: this script needs to be run from your build directory,"
+ echo "or you need to explicitly set OE_TMPDIR in your environment"
+ else
+ echo "There was an error running bitbake to determine TMPDIR"
+ echo "Here is the output from 'bitbake -e':"
+ bitbake -e
+ fi
exit 1
fi
fi