]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
insane.bbclass: Report all invalid PACKAGECONFIGs for a recipe at once
authorPeter Kjellerstedt <pkj@axis.com>
Tue, 22 Apr 2025 15:18:08 +0000 (17:18 +0200)
committerSteve Sakoman <steve@sakoman.com>
Thu, 8 May 2025 20:19:12 +0000 (13:19 -0700)
Rather than reporting each invalid PACKAGECONFIG with a separate error
message, report them all with one error message.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/classes-global/insane.bbclass

index 748de050e03c557f70e694c1d3b45a7d20e58db3..cd26bf5eb9ffdbb3726674380f1077a3612d6360 100644 (file)
@@ -1469,10 +1469,10 @@ python do_recipe_qa() {
         pkgconfigs = (d.getVar("PACKAGECONFIG") or "").split()
         if pkgconfigs:
             pkgconfigflags = d.getVarFlags("PACKAGECONFIG") or {}
-            for pkgconfig in pkgconfigs:
-                if pkgconfig not in pkgconfigflags:
-                    error_msg = "%s: invalid PACKAGECONFIG: %s" % (pn, pkgconfig)
-                    oe.qa.handle_error("invalid-packageconfig", error_msg, d)
+            invalid_pkgconfigs = set(pkgconfigs) - set(pkgconfigflags)
+            if invalid_pkgconfigs:
+                error_msg = "%s: invalid PACKAGECONFIG(s): %s" % (pn, " ".join(sorted(invalid_pkgconfigs)))
+                oe.qa.handle_error("invalid-packageconfig", error_msg, d)
 
     pn = d.getVar('PN')
     test_missing_metadata(pn, d)