summaryrefslogtreecommitdiffstats
path: root/lib/bb/cookerdata.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-28 10:32:56 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-28 10:32:58 +0100
commit0e639f5cbc813c8d4719019cfdd4287e9a429610 (patch)
tree96bdb92f42b5ad5dc8bdc22f9004bddf2d9d9e38 /lib/bb/cookerdata.py
parent684bc6dcb11ecb1fd7a4d25c08909ad9879e8342 (diff)
downloadopenembedded-core-contrib-0e639f5cbc813c8d4719019cfdd4287e9a429610.tar.gz
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] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> A
Diffstat (limited to 'lib/bb/cookerdata.py')
-rw-r--r--lib/bb/cookerdata.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py
index 4ddc2a5144..a0379cf7f3 100644
--- a/lib/bb/cookerdata.py
+++ b/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)