]> code.ossystems Code Review - openembedded-core.git/commit
checklayer: parse LAYERDEPENDS with bb.utils.explode_dep_versions2()
authorNicolas Dechesne <nicolas.dechesne@linaro.org>
Fri, 26 Jun 2020 12:29:30 +0000 (14:29 +0200)
committerSteve Sakoman <steve@sakoman.com>
Mon, 29 Jun 2020 15:17:44 +0000 (05:17 -1000)
commit819f41906197bb712af37349c0865002bfbd7c9b
treec621e66a51c27f55bfa3d00cf9defef5d02f0372
parent42d5386cf22716bbbc47f31979db78f4ad92bc93
checklayer: parse LAYERDEPENDS with bb.utils.explode_dep_versions2()

LAYERDEPENDS is a string of this format:
"DEPEND1 (optional version) DEPEND2 (optional version) ..."

However when we parse LAYERDEPENDS in _get_layer_collections() we
parse it as a simple string, and if any optional versions are there the
'depends' field is wrong. For example, running yocto-check-layer
might result in such errors:

ERROR: Layer meta-python depends on (>= and isn't found.
ERROR: Layer meta-python depends on 12) and isn't found.

Let's use bb.utils.explode_dep_versions2() to parse LAYERDEPENDS, and
create a string that contains all dependencies, effectively
skipping/ignoring any optional versions.

[YOCTO #13957]

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit f81f07afc200fe06c5c06ea81a4f8a3a43436faf)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
scripts/lib/checklayer/__init__.py