From 624160af6e5429c9f08b201bc6599dc8dcb62c3f Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 28 Jun 2013 10:32:56 +0100 Subject: bitbake: cookerdata: Improve message if BBPATH is unset and bblayers.conf not found If BBPATH isn't set and bblayers.conf isn't found, improve the message shown to the user to help their understanding of what the problem might be. [YOCTO #3271] (Bitbake rev: 0e639f5cbc813c8d4719019cfdd4287e9a429610) Signed-off-by: Richard Purdie A --- bitbake/lib/bb/cookerdata.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'bitbake') diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py index 4ddc2a5144..a0379cf7f3 100644 --- a/bitbake/lib/bb/cookerdata.py +++ b/bitbake/lib/bb/cookerdata.py @@ -253,7 +253,12 @@ class CookerDataBuilder(object): data.delVar('LAYERDIR') if not data.getVar("BBPATH", True): - raise SystemExit("The BBPATH variable is not set") + msg = "The BBPATH variable is not set" + if not layerconf: + msg += (" and bitbake did not find a conf/bblayers.conf file in" + " the expected location.\nMaybe you accidentally" + " invoked bitbake from the wrong directory?") + raise SystemExit(msg) data = parse_config_file(os.path.join("conf", "bitbake.conf"), data) -- cgit v1.2.3-54-g00ecf