diff options
author | Nicolas Dechesne <nicolas.dechesne@linaro.org> | 2021-07-22 14:46:42 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-07-28 23:47:00 +0100 |
commit | 4f452a8be1088ba4bf5da79059de375e3f9ae7c0 (patch) | |
tree | e862607371e05c85e5b81626030a9416e3711e36 /scripts/lib | |
parent | 989d7564050138f7cc124a4d4c1e7509bfb01aac (diff) | |
download | poky-4f452a8be1088ba4bf5da79059de375e3f9ae7c0.tar.gz |
checklayer: new function get_layer_dependencies()
Split add_layer_dependencies() into 2 parts. First search for layer
dependencies, and then add them to the config. That allows us to
call get_layer_dependencies() independently.
(From OE-Core rev: 08edf928aac3f2daaa0c256d4c21e56e2db72bff)
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rw-r--r-- | scripts/lib/checklayer/__init__.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/lib/checklayer/__init__.py b/scripts/lib/checklayer/__init__.py index fe545607bb..72d9df0a62 100644 --- a/scripts/lib/checklayer/__init__.py +++ b/scripts/lib/checklayer/__init__.py | |||
@@ -156,7 +156,7 @@ def _find_layer_depends(depend, layers): | |||
156 | return layer | 156 | return layer |
157 | return None | 157 | return None |
158 | 158 | ||
159 | def add_layer_dependencies(bblayersconf, layer, layers, logger): | 159 | def get_layer_dependencies(layer, layers, logger): |
160 | def recurse_dependencies(depends, layer, layers, logger, ret = []): | 160 | def recurse_dependencies(depends, layer, layers, logger, ret = []): |
161 | logger.debug('Processing dependencies %s for layer %s.' % \ | 161 | logger.debug('Processing dependencies %s for layer %s.' % \ |
162 | (depends, layer['name'])) | 162 | (depends, layer['name'])) |
@@ -203,6 +203,11 @@ def add_layer_dependencies(bblayersconf, layer, layers, logger): | |||
203 | layer_depends = recurse_dependencies(depends, layer, layers, logger, layer_depends) | 203 | layer_depends = recurse_dependencies(depends, layer, layers, logger, layer_depends) |
204 | 204 | ||
205 | # Note: [] (empty) is allowed, None is not! | 205 | # Note: [] (empty) is allowed, None is not! |
206 | return layer_depends | ||
207 | |||
208 | def add_layer_dependencies(bblayersconf, layer, layers, logger): | ||
209 | |||
210 | layer_depends = get_layer_dependencies(layer, layers, logger) | ||
206 | if layer_depends is None: | 211 | if layer_depends is None: |
207 | return False | 212 | return False |
208 | else: | 213 | else: |