[06/13] do not assert on legitimate re-execution of tasks

Message ID 20261002144936.246628-7-felix.moessbauer@siemens.com
State New
Headers show
Series More build time reductions | expand

Commit Message

Felix Moessbauer Oct. 2, 2026, 2:49 p.m. UTC
When running with sstate cache and a bitbake hashequiv server, tasks can
be re-executed even though this does not indicate false sharing of a
WORKDIR. The false-sharing detector in isar-events must not assert on
these cases.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 meta/classes-global/isar-events.bbclass | 5 +++++
 1 file changed, 5 insertions(+)

Patch

diff --git a/meta/classes-global/isar-events.bbclass b/meta/classes-global/isar-events.bbclass
index 15bfdb99..692bcaf7 100644
--- a/meta/classes-global/isar-events.bbclass
+++ b/meta/classes-global/isar-events.bbclass
@@ -23,6 +23,9 @@  def task_once_stamp(d):
 addhandler task_started
 
 python task_started() {
+    # when using a hashequiv server, the same task may be executed multiple times
+    if d.getVar('BB_SIGNATURE_HANDLER') == 'OEEquivHash':
+        return
     try:
         f = open(task_once_stamp(d), "x")
         f.close()
@@ -37,6 +40,8 @@  task_started[eventmask] = "bb.build.TaskStarted"
 addhandler task_failed
 
 python task_failed() {
+    if d.getVar('BB_SIGNATURE_HANDLER') == 'OEEquivHash':
+        return
     # Avoid false positives if a second target depends on this task and retries
     # the execution after the first failure.
     os.remove(task_once_stamp(d))