summaryrefslogtreecommitdiffstats
path: root/lib/bb/cookerdata.py
diff options
context:
space:
mode:
authorOleksandr Kravchuk <open.source@oleksandr-kravchuk.com>2019-06-14 02:09:25 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-06-18 11:23:16 +0100
commit19291f7c4d17086ebb6a7b80c3cb06333d7fd55b (patch)
tree3f48c6fb5d4895c16c57ae525ccad0e7368f1fcd /lib/bb/cookerdata.py
parent578f0c02f6a13f4315e7c2ce8b5e876dd2025055 (diff)
downloadbitbake-19291f7c4d17086ebb6a7b80c3cb06333d7fd55b.tar.gz
cooker: list all nonexistent bblayer directories
Check existence of all the bblayer direcotories at once and print them all, so if there are multiple nonexistent directories, user does not have to correct bblayers.conf and restart bitbake multiple times. [YOCTO #11647] Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/cookerdata.py')
-rw-r--r--lib/bb/cookerdata.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py
index f8ae41093..842275d53 100644
--- a/lib/bb/cookerdata.py
+++ b/lib/bb/cookerdata.py
@@ -342,14 +342,24 @@ class CookerDataBuilder(object):
data = parse_config_file(layerconf, data)
layers = (data.getVar('BBLAYERS') or "").split()
+ broken_layers = []
data = bb.data.createCopy(data)
approved = bb.utils.approved_variables()
+
+ # Check whether present layer directories exist
for layer in layers:
if not os.path.isdir(layer):
- parselog.critical("Layer directory '%s' does not exist! "
- "Please check BBLAYERS in %s" % (layer, layerconf))
- sys.exit(1)
+ broken_layers.append(layer)
+
+ if broken_layers:
+ parselog.critical("The following layer directories do not exist:")
+ for layer in broken_layers:
+ parselog.critical(" %s", layer)
+ parselog.critical("Please check BBLAYERS in %s" % (layerconf))
+ sys.exit(1)
+
+ for layer in layers:
parselog.debug(2, "Adding layer %s", layer)
if 'HOME' in approved and '~' in layer:
layer = os.path.expanduser(layer)