mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 00:59:48 +00:00
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] (From OE-Core rev: 465d7b6e66b5a55706535e194b3e44e11ee542c6) Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
be174d7bc3
commit
32fdbd879c
+10
-2
@@ -283,8 +283,16 @@ setup_tmpdir() {
|
|||||||
# We have bitbake in PATH, get OE_TMPDIR from bitbake
|
# We have bitbake in PATH, get OE_TMPDIR from bitbake
|
||||||
OE_TMPDIR=`MACHINE=$MACHINE bitbake -e | grep ^TMPDIR=\" | cut -d '=' -f2 | cut -d '"' -f2`
|
OE_TMPDIR=`MACHINE=$MACHINE bitbake -e | grep ^TMPDIR=\" | cut -d '=' -f2 | cut -d '"' -f2`
|
||||||
if [ -z "$OE_TMPDIR" ]; then
|
if [ -z "$OE_TMPDIR" ]; then
|
||||||
echo "Error: this script needs to be run from your build directory,"
|
# Check for errors from bitbake that the user needs to know about
|
||||||
echo "or you need to explicitly set OE_TMPDIR in your environment"
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user