diff options
author | Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com> | 2019-06-14 02:09:25 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-06-18 11:23:48 +0100 |
commit | 8a5501110e3668ab545868fd6d17a4b81bdd97c7 (patch) | |
tree | b82ea85962d2549b2b37f273d66de68f627a942b /bitbake | |
parent | 6896ca82f106c65e6c7d08986cfe86d2305c6afa (diff) | |
download | poky-8a5501110e3668ab545868fd6d17a4b81bdd97c7.tar.gz |
bitbake: 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]
(Bitbake rev: 19291f7c4d17086ebb6a7b80c3cb06333d7fd55b)
Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/cookerdata.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py index f8ae41093b..842275d530 100644 --- a/bitbake/lib/bb/cookerdata.py +++ b/bitbake/lib/bb/cookerdata.py | |||
@@ -342,14 +342,24 @@ class CookerDataBuilder(object): | |||
342 | data = parse_config_file(layerconf, data) | 342 | data = parse_config_file(layerconf, data) |
343 | 343 | ||
344 | layers = (data.getVar('BBLAYERS') or "").split() | 344 | layers = (data.getVar('BBLAYERS') or "").split() |
345 | broken_layers = [] | ||
345 | 346 | ||
346 | data = bb.data.createCopy(data) | 347 | data = bb.data.createCopy(data) |
347 | approved = bb.utils.approved_variables() | 348 | approved = bb.utils.approved_variables() |
349 | |||
350 | # Check whether present layer directories exist | ||
348 | for layer in layers: | 351 | for layer in layers: |
349 | if not os.path.isdir(layer): | 352 | if not os.path.isdir(layer): |
350 | parselog.critical("Layer directory '%s' does not exist! " | 353 | broken_layers.append(layer) |
351 | "Please check BBLAYERS in %s" % (layer, layerconf)) | 354 | |
352 | sys.exit(1) | 355 | if broken_layers: |
356 | parselog.critical("The following layer directories do not exist:") | ||
357 | for layer in broken_layers: | ||
358 | parselog.critical(" %s", layer) | ||
359 | parselog.critical("Please check BBLAYERS in %s" % (layerconf)) | ||
360 | sys.exit(1) | ||
361 | |||
362 | for layer in layers: | ||
353 | parselog.debug(2, "Adding layer %s", layer) | 363 | parselog.debug(2, "Adding layer %s", layer) |
354 | if 'HOME' in approved and '~' in layer: | 364 | if 'HOME' in approved and '~' in layer: |
355 | layer = os.path.expanduser(layer) | 365 | layer = os.path.expanduser(layer) |