public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Peter Kjellerstedt <pkj@axis.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH] insane.bbclass: Allow the warning about virtual/ to be disabled
Date: Mon, 22 Jan 2024 06:52:32 +0100	[thread overview]
Message-ID: <20240122055232.2415989-1-pkj@axis.com> (raw)

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.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta/classes-global/insane.bbclass | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass
index 828f618cda..4ab7e4069d 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, the substring 'virtual/' holds no meaning in this context. It is suggested to use the 'virtual-' 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 is suggested to use 'virtual-' instead." % (k, var), d)
 
     issues = []
     if (d.getVar('PACKAGES') or "").split():


             reply	other threads:[~2024-01-22  5:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-22  5:52 Peter Kjellerstedt [this message]
2024-01-22 14:02 ` [OE-core] [PATCH] insane.bbclass: Allow the warning about virtual/ to be disabled Richard Purdie
2024-01-22 14:10   ` Martin Jansa
2024-01-22 14:20   ` Peter Kjellerstedt
     [not found]   ` <17ACB13E58D9A491.7395@lists.openembedded.org>
2024-02-10  0:18     ` Peter Kjellerstedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240122055232.2415989-1-pkj@axis.com \
    --to=pkj@axis.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox