[OE-core] [PATCH] base.bbclass: Don't warn about "invalid" PACKAGECONFIGs by default

Olof Johansson olof.johansson at axis.com
Thu Jul 30 09:43:45 UTC 2015


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 at 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




More information about the Openembedded-core mailing list