In case a LAYERDEPENDS of a tested layer contains a dependency which is
present in additional layers, such dependency does not get pulled into
the layer test as a dependency be default and instead of YCL stops and
reports it cannot find dependent layers.

An example of this is a layer with LAYERDEPENDS = " core openembedded-core "
and then by running YCL on such layer using the following invocation:
$ yocto-check-layer -d --additional-layers ../meta-openembedded/ -- 
../meta-board-distro
...
ERROR: Layer meta-board-distro depends on openembedded-layer and isn't found.
...

The fix here adds all layers in the --additional-layers list into layers
which are searched for dependencies of the tested layer. That way, even
layers present in additional-layers list are searched and possibly used
as dependencies for the layer check.

Signed-off-by: Marek Vasut <ma...@denx.de>
---
Cc: Alexandre Belloni <alexandre.bell...@bootlin.com>
Cc: Nicolas Dechesne <nicolas.deche...@linaro.org>
Cc: Richard Purdie <richard.pur...@linuxfoundation.org>
---
 scripts/yocto-check-layer | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/yocto-check-layer b/scripts/yocto-check-layer
index 67cc71950f..fbb715c0af 100755
--- a/scripts/yocto-check-layer
+++ b/scripts/yocto-check-layer
@@ -144,7 +144,7 @@ def main():
     if not args.no_auto_dependency:
         depends = []
         for layer in layers:
-            layer_depends = get_layer_dependencies(layer, dep_layers, logger)
+            layer_depends = get_layer_dependencies(layer, dep_layers + 
additional_layers, logger)
             if layer_depends:
                 for d in layer_depends:
                     if d not in depends:
@@ -188,7 +188,7 @@ def main():
         missing_dependencies = not add_layer_dependencies(bblayersconf, layer, 
dep_layers, logger)
         if not missing_dependencies:
             for additional_layer in additional_layers:
-                if not add_layer_dependencies(bblayersconf, additional_layer, 
dep_layers, logger):
+                if not add_layer_dependencies(bblayersconf, additional_layer, 
dep_layers + additional_layers, logger):
                     missing_dependencies = True
                     break
         if missing_dependencies:
-- 
2.39.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#179710): 
https://lists.openembedded.org/g/openembedded-core/message/179710
Mute This Topic: https://lists.openembedded.org/mt/98069983/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to