]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
classes-global/insane: Add check for "virtual/" in RPROVIDES and RDEPENDS
authorSimone Weiß <simone.p.weiss@posteo.com>
Sun, 14 Jan 2024 17:19:03 +0000 (17:19 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 19 Jan 2024 00:14:23 +0000 (00:14 +0000)
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>
meta/classes-global/insane.bbclass

index ec76f9a5e315b6f32bdf2b7d2de6ad8675b0e058..828f618cda1ada64c37ae2bf09cdcdded32cefae 100644 (file)
@@ -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():