]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
insane.bbclass: avoid unnecessary rerun of do_patch
authorChen Qi <Qi.Chen@windriver.com>
Thu, 18 Dec 2025 02:53:51 +0000 (10:53 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 22 Dec 2025 17:54:58 +0000 (17:54 +0000)
When toggling ptest for DISTRO_FEATURES, the do_patch function
gets rerun.

The dependency chain is:
do_patch -> do_qa_patch -> DISTRO_FEATURES{ptest}

Such rerun is not necessary. And it's kind of annoying because everything
gets rebuilt, including cross toolchain and recipes not using ptest.

The ERROR_QA and WARN_QA should be enough to trigger the re-run
if unimplemented-ptest is added to one of them. So remove the first
check of DISTRO_FEATURES on ptest to avoid these unnecessary reruns.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-global/insane.bbclass

index fed8163c3e09f2daf1260c3ef2773d115747a8e9..aeffee798393fb9e219a83c8bf3e644c3c09de51 100644 (file)
@@ -1305,9 +1305,7 @@ python do_qa_patch() {
         return False
 
     srcdir = d.getVar('S')
-    if not bb.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d):
-        pass
-    elif not (bb.utils.contains('ERROR_QA', 'unimplemented-ptest', True, False, d) or bb.utils.contains('WARN_QA', 'unimplemented-ptest', True, False, d)):
+    if not (bb.utils.contains('ERROR_QA', 'unimplemented-ptest', True, False, d) or bb.utils.contains('WARN_QA', 'unimplemented-ptest', True, False, d)):
         pass
     elif bb.data.inherits_class('ptest', d):
         bb.note("Package %s QA: skipping unimplemented-ptest: ptest implementation detected" % d.getVar('PN'))