From bf9366583f53fe2498d7aa9192ebfe6562887cf3 Mon Sep 17 00:00:00 2001 From: Peter Kjellerstedt Date: Sat, 5 Apr 2025 03:32:58 +0200 Subject: [PATCH] insane.bbclass: Report all invalid PACKAGECONFIGs for a recipe at once Rather than reporting each invalid PACKAGECONFIG with a separate error message, report them all with one error message. Signed-off-by: Peter Kjellerstedt Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- meta/classes-global/insane.bbclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass index 748de050e03..cd26bf5eb9f 100644 --- a/meta/classes-global/insane.bbclass +++ b/meta/classes-global/insane.bbclass @@ -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) -- 2.47.3