Hello,

I have a new patch for this, it will be moved into insane.bbclass,
and the recipe can set INSANE_SKIP:
+
+    # Check invalid PACKAGECONFIG
+    pkgconfig = (d.getVar("PACKAGECONFIG", True) or "").split()
+    if pkgconfig:
+        pkgconfigflags = d.getVarFlags("PACKAGECONFIG") or {}
+        for pconfig in pkgconfig:
+            if pconfig not in pkgconfigflags:
+                pn = d.getVar('PN', True)
+                error_msg = "%s: invalid PACKAGECONFIG: %s" % (pn, pconfig)
+                package_qa_handle_error("invalid-pkgconfig", error_msg, d)

I'm testing it, and will send it out sooner.

// Robert

On 07/30/2015 05:43 PM, Olof Johansson wrote:
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 <[email protected]>
---
  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)


--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to