diff options
author | Simone Weiß <simone.p.weiss@posteo.com> | 2024-01-14 17:19:03 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-01-19 00:14:23 +0000 |
commit | f673d3d239799fb1ab50f4aa5d44187666aa0cd7 (patch) | |
tree | f2275dcf06fe19e4e38e74327ae68fc106ed4dd0 | |
parent | 2752f6a4f8a45afff3366e5aa75672ba6f994a23 (diff) | |
download | openembedded-core-contrib-f673d3d239799fb1ab50f4aa5d44187666aa0cd7.tar.gz |
classes-global/insane: Add check for "virtual/" in RPROVIDES and RDEPENDS
Fixes [YOCTO #14538]
Recipes shouldn't use "virtual/" in RPROVIDES and RDEPENDS. This was
addressed already in recipes in meta-oe and oe-core. Add a test for
this in insane.bbclass to ensure no regressions occur.
Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes-global/insane.bbclass | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass index ec76f9a5e3..828f618cda 100644 --- a/meta/classes-global/insane.bbclass +++ b/meta/classes-global/insane.bbclass @@ -1607,6 +1607,12 @@ python () { if (d.getVar(d.expand('DEPENDS:${PN}'))): oe.qa.handle_error("pkgvarcheck", "recipe uses DEPENDS:${PN}, should use DEPENDS", d) + # virtual/ is meaningless for those variables + for k in ['RDEPENDS', 'RPROVIDES']: + for var in bb.utils.explode_deps(d.getVar(k + ':' + pn) or ""): + if var.startswith("virtual/"): + bb.warn("%s is set to %s, the substring 'virtual/' holds no meaning in this context. It is suggested to use the 'virtual-' instead." % (k, var)) + issues = [] if (d.getVar('PACKAGES') or "").split(): for dep in (d.getVar('QADEPENDS') or "").split(): |