diff mbox series

[PATCHv2,2/2] insane.bbclass: Add a package QA test for invalid PACKAGECONFIGs

Message ID 20260320223933.1589940-2-pkj@axis.com
State New
Headers show
Series [PATCHv2,1/2] Revert "insane.bbclass: Move test for invalid PACKAGECONFIGs to do_recipe_qa" | expand

Commit Message

Peter Kjellerstedt March 20, 2026, 10:39 p.m. UTC
Normally, this test is run as part of the do_qa_configure() postfunc to
the configure task. However, for the rare case that the configure task
has been deleted (e.g., in packagegroups), then run it as a package QA
test instead.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---

PATCHv2: New in v2. Replaces the previous solution that instead modified
packagegroup.bbclass.

 meta/classes-global/insane.bbclass | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass
index 8bbe5bb19a..77d708f367 100644
--- a/meta/classes-global/insane.bbclass
+++ b/meta/classes-global/insane.bbclass
@@ -1087,6 +1087,13 @@  def package_qa_check_missing_update_alternatives(pn, d):
         if d.getVar('ALTERNATIVE:%s' % pkg) and not bb.data.inherits_class('update-alternatives', d):
             oe.qa.handle_error("missing-update-alternatives", "%s: recipe defines ALTERNATIVE:%s but doesn't inherit update-alternatives. This might fail during do_rootfs later!" % (pn, pkg), d)
 
+QARECIPETEST[invalid-packageconfig] = "package_qa_invalid_packageconfig"
+def package_qa_invalid_packageconfig(pn, d):
+    # For almost all recipes, the check for invalid PACKAGECONFIGs will be run
+    # as part of the do_qa_configure() postfunc to the configure task instead.
+    if 'do_configure' not in bb.build.listtasks(d):
+        configure_qa_invalid_packageconfig(pn, d)
+
 def parse_test_matrix(matrix_name, skip, d):
         testmatrix = d.getVarFlags(matrix_name) or {}
         g = globals()