]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cookerdata: Improve message if BBPATH is unset and bblayers.conf not found
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 28 Jun 2013 09:32:56 +0000 (10:32 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 28 Jun 2013 09:32:58 +0000 (10:32 +0100)
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

lib/bb/cookerdata.py

index 4ddc2a5144116a74eb04add1f1ef095fa1e4f450..a0379cf7f3411a17b596aaacc77571fe7c1fc3da 100644 (file)
@@ -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)