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)