From: Simone Weiß Date: Sun, 14 Jan 2024 17:19:03 +0000 (+0000) Subject: classes-global/insane: Add check for "virtual/" in RPROVIDES and RDEPENDS X-Git-Tag: uninative-4.4~452 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f673d3d239799fb1ab50f4aa5d44187666aa0cd7;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git 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ß Signed-off-by: Richard Purdie --- diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass index ec76f9a5e31..828f618cda1 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():