| Summary: | Better error message when bitbake is run from the 'wrong' directory | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] BitBake | Reporter: | Evadeflow <evadeflow> | ||||||
| Component: | bitbake | Assignee: | Richard Purdie <richard.purdie> | ||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||
| Severity: | enhancement | ||||||||
| Priority: | Low | CC: | bluelightning, corneliux.stoicescu, jessica.zhang, poky.bs.watcher, poky.watcher | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | 1.5 | ||||||||
| Hardware: | x86 | ||||||||
| OS: | Multiple | ||||||||
| Whiteboard: | |||||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||||
| Verified: | Documentation change: | Done (doc changes complete) | |||||||
| Attachments: |
|
||||||||
|
Description
Evadeflow
2012-10-10 16:29:10 UTC
Hello. I just ran bitbake from the poky directory and I got: " Unable to find conf/bblayers.conf BitBake must be run from within your build diectory: /home/cornel/Yocto/poky/build " Please give us the exact steps to reproduce this. Thank you Cornel. Created attachment 885 [details] Bitbake 'Hello World!' example This example is the one that caused me to file the bug. But I don't think it's needed to reproduce the behavior: > poky|master|% pwd > /home/evadeflow/projects/poky > poky|master|% echo "Note: I have not sourced oe-init-build-env" > Note: I have not sourced oe-init-build-env > poky|master|% echo $PATH > /home/evadeflow/bin:/home/evadeflow/jdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin > poky|master|% ./bitbake/bin/bitbake foo > The BBPATH variable is not set > DEBUG: Removed the following variables from the environment: http_proxy, CVS_RSH, LANG, SHLVL, LD_LIBRARY_PATH, EDITOR, SUDO_USER, USERNAME, PROMPT, PYTHONPATH, SUDO_UID, RPROMPT, _, SUDO_COMMAND, SUDO_GID, OLDPWD, MAIL > DEBUG: UI 'knotty' does not require extra cache! Not a big deal, I just think that error message could be better. :-) You should not be running bin/bitbake but instead scripts/bitbake, which is a wrapper that ensures everything is set up correctly. bitbake as we use it in OE-Core/Poky is really intended be run from the wrapper script so I don't think we really support doing otherwise (until the wrapper script goes away, which it will do at some point in the future). (In reply to comment #3) > You should not be running bin/bitbake but instead scripts/bitbake... The message is a lot clearer in this case: > bitbake_hello% ../poky/scripts/bitbake foo > Unable to find conf/bblayers.conf > BitBake must be run from within your build directory Since I was following along with someone's 'Hello, World' example, I just did what it recommended. If the wrapper script can emit such a lucid error message, why can't bitbake/bin say something more helpful than: > The BBPATH variable is not set I completely understand that this is an extremely low priority item. You can assign this bug to me if you want. It would be a good introduction for me, and maybe I'll discover along the way that improving the error output is actually quite involved. I'm just trying to be as critical of bitbake's user experience as I am about my own company's products. A bad first impression can turn off would-be users who are just 'doing a drive-by', and mind share is everything. Created attachment 887 [details]
Fix error msg when bblayers.conf not found
Humbly submit this is small improvement...
Patch merged to master: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=624160af6e5429c9f08b201bc6599dc8dcb62c3f sorry about the delay in doing so, didn't notice there was a patch here. Incidentally the wrapper script is now gone so this is a bigger issue. |