From 1648d0e8f7327eb8ff34da2352e16f2591654be3 Mon Sep 17 00:00:00 2001 From: Peter Kjellerstedt Date: Mon, 22 Jan 2024 06:52:32 +0100 Subject: insane.bbclass: Allow the warning about virtual/ to be disabled Commit f673d3d239799fb1ab50f4aa5d44187666aa0cd7 introduced a warning for virtual/ being used in RPROVIDES and RDEPENDS. Make it possible to disable the warning by removing "virtual-slash from WARN_QA. (From OE-Core rev: 968ffdb9fee5017eecce36ce878ea604c869ce95) Signed-off-by: Peter Kjellerstedt Signed-off-by: Richard Purdie --- meta/classes-global/insane.bbclass | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'meta') diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass index 9909526f51..e963001d09 100644 --- a/meta/classes-global/insane.bbclass +++ b/meta/classes-global/insane.bbclass @@ -34,7 +34,7 @@ WARN_QA ?= " libdir xorg-driver-abi buildpaths \ missing-update-alternatives native-last missing-ptest \ license-exists license-no-generic license-syntax license-format \ license-incompatible license-file-missing obsolete-license \ - 32bit-time \ + 32bit-time virtual-slash \ " ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \ perms dep-cmp pkgvarcheck perm-config perm-line perm-link \ @@ -1607,11 +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 but the substring 'virtual/' holds no meaning in this context. It only works for build time dependencies, not runtime ones. It is suggested to use 'VIRTUAL-RUNTIME_' variables instead." % (k, var)) + # virtual/ is meaningless for these variables + if "virtual-slash" in (d.getVar("ALL_QA") or "").split(): + for k in ['RDEPENDS', 'RPROVIDES']: + for var in bb.utils.explode_deps(d.getVar(k + ':' + pn) or ""): + if var.startswith("virtual/"): + oe.qa.handle_error("virtual-slash", "%s is set to %s but the substring 'virtual/' holds no meaning in this context. It only works for build time dependencies, not runtime ones. It is suggested to use 'VIRTUAL-RUNTIME_' variables instead." % (k, var), d) issues = [] if (d.getVar('PACKAGES') or "").split(): -- cgit v1.2.3-54-g00ecf