diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-12-26 23:39:26 +0000 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-12-28 11:03:29 +0000 |
commit | fabc06b2d0559b33ca987af1310fa624081beacc (patch) | |
tree | 9399d333fe372784563ba54b6a043679d373fe70 /layerindex/recipeparse.py | |
parent | 75c44fd770ffa1890159b516c7b0cc59669dea7e (diff) | |
download | openembedded-core-contrib-fabc06b2d0559b33ca987af1310fa624081beacc.tar.gz |
Check that the core layer contains conf/bitbake.conf
This ensures we get a sensible error message prompting the user to set
the subdirectory, instead of a BitBake parse error.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'layerindex/recipeparse.py')
-rw-r--r-- | layerindex/recipeparse.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/layerindex/recipeparse.py b/layerindex/recipeparse.py index 12a6193a33..a670e8fcbd 100644 --- a/layerindex/recipeparse.py +++ b/layerindex/recipeparse.py @@ -65,7 +65,7 @@ def init_parser(settings, branch, bitbakepath, enable_tracking=False, nocheckout # Ensure we have OE-Core set up to get some base configuration core_layer = utils.get_layer(settings.CORE_LAYER_NAME) if not core_layer: - raise RecipeParseError("Unable to find core layer %s in database; check CORE_LAYER_NAME setting" % settings.CORE_LAYER_NAME) + raise RecipeParseError("Unable to find core layer %s in database; create this layer or set the CORE_LAYER_NAME setting to point to the core layer" % settings.CORE_LAYER_NAME) core_layerbranch = core_layer.get_layerbranch(branch.name) core_branchname = branch.name if core_layerbranch: @@ -80,6 +80,8 @@ def init_parser(settings, branch, bitbakepath, enable_tracking=False, nocheckout if not nocheckout: out = utils.runcmd("git checkout origin/%s" % core_branchname, core_repodir, logger=logger) out = utils.runcmd("git clean -f -x", core_repodir, logger=logger) + if not os.path.exists(os.path.join(core_layerdir, 'conf/bitbake.conf')): + raise RecipeParseError("conf/bitbake.conf not found in core layer %s - is subdirectory set correctly?" % core_layer.name) # The directory above where this script exists should contain our conf/layer.conf, # so add it to BBPATH along with the core layer directory confparentdir = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..')) |