Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] base.bbclass: Don't warn about "invalid" PACKAGECONFIGs by default
@ 2015-07-30  9:43 Olof Johansson
  2015-07-30  9:53 ` Burton, Ross
  2015-07-30 10:08 ` Robert Yang
  0 siblings, 2 replies; 6+ messages in thread
From: Olof Johansson @ 2015-07-30  9:43 UTC (permalink / raw)
  To: openembedded-core

The recently added warnings for recipes that try to use undefined
packageconfigs isn't compatible with the PACKAGECONFIG approach of
exporting a common set of configs and letting the recipe look only at
the configs they care about.

This change introduces a STRICT_PACKAGECONFIG variable that one can
enable to get the warnings.

Signed-off-by: Olof Johansson <olofjn@axis.com>
---
 meta/classes/base.bbclass | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index e0f1053..6f652d8 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -340,9 +340,12 @@ python () {
         pkgconfig = (d.getVar('PACKAGECONFIG', True) or "").split()
         pn = d.getVar("PN", True)
 
-        for pconfig in pkgconfig:
-            if pconfig not in pkgconfigflags:
-                bb.warn("%s: invalid PACKAGECONFIG: %s" % (pn, pconfig))
+        # If STRICT_PACKAGECONFIG is set, warn about recipes that sets undefined
+        # PACKAGECONFIGs.
+        if bb.utils.to_boolean(d.getVar("STRICT_PACKAGECONFIG", True)):
+            for pconfig in pkgconfig:
+                if pconfig not in pkgconfigflags:
+                    bb.warn("%s: invalid PACKAGECONFIG: %s" % (pn, pconfig))
 
         mlprefix = d.getVar("MLPREFIX", True)
 
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-07-30 15:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-30  9:43 [PATCH] base.bbclass: Don't warn about "invalid" PACKAGECONFIGs by default Olof Johansson
2015-07-30  9:53 ` Burton, Ross
2015-07-30 10:14   ` Olof Johansson
2015-07-30 10:08 ` Robert Yang
2015-07-30 11:24   ` Olof Johansson
2015-07-30 15:21     ` Robert Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox