Bug 3112

Summary: runqemu fails with misleading error message when bitbake -e fails with an error
Product: [Runtime] General Runtime Reporter: Scott Garman <scott.a.garman>
Component: General RuntimeAssignee: Scott Garman <scott.a.garman>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: sgw, sstncr
Version: unspecified   
Target Milestone: 1.3 M5   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Scott Garman 2012-09-13 22:17:21 UTC
The runqemu script needs to determine TMPDIR in order to find the native sysroot to run qemu, tunctl, etc. It executes bitbake -e | grep ^TMPDIR in order to do this. However, in certain edge cases this command can fail to run, and when this happens you get the following error message:

Error: this script needs to be run from your build directory,
or you need to explicitly set OE_TMPDIR in your environment

Which is misleading, when, for example, bitbake is failing because LCONF_VERSION in bblayers.conf needs to be upgraded. 

In order to show this error message from bitbake, an additional check is needed to collect the error output of bitbake and show it to the user.
Comment 1 Scott Garman 2012-09-21 18:07:43 UTC
Fixed in oe-core and poky master as of:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=32fdbd879c83dae7c23ee0f17d0035bbae832495
Comment 2 Stefan Stanacar 2012-10-26 13:00:22 UTC
Verified in 27af23e65f63b41962a7cfddba9e9372d5212396