summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/runqueue.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/runqueue.py')
-rw-r--r--bitbake/lib/bb/runqueue.py31
1 files changed, 19 insertions, 12 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index bd7f03f981..a869ba527a 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -2283,12 +2283,26 @@ class RunQueueExecute:
for dep in self.rqdata.runtaskentries[tid].depends:
procdep.append(dep)
orighash = self.rqdata.runtaskentries[tid].hash
- self.rqdata.runtaskentries[tid].hash = bb.parse.siggen.get_taskhash(tid, procdep, self.rqdata.dataCaches[mc_from_tid(tid)])
+ newhash = bb.parse.siggen.get_taskhash(tid, procdep, self.rqdata.dataCaches[mc_from_tid(tid)])
origuni = self.rqdata.runtaskentries[tid].unihash
- self.rqdata.runtaskentries[tid].unihash = bb.parse.siggen.get_unihash(tid)
- logger.debug(1, "Task %s hash changes: %s->%s %s->%s" % (tid, orighash, self.rqdata.runtaskentries[tid].hash, origuni, self.rqdata.runtaskentries[tid].unihash))
+ newuni = bb.parse.siggen.get_unihash(tid)
+ # FIXME, need to check it can come from sstate at all for determinism?
+ remapped = False
+ if newuni == origuni:
+ # Nothing to do, we match, skip code below
+ remapped = True
+ elif tid in self.scenequeue_covered or tid in self.sq_live:
+ # Already ran this setscene task or it running. Report the new taskhash
+ remapped = bb.parse.siggen.report_unihash_equiv(tid, newhash, origuni, newuni, self.rqdata.dataCaches)
+ logger.info("Already covered setscene for %s so ignoring rehash (remap)" % (tid))
+
+ if not remapped:
+ logger.debug(1, "Task %s hash changes: %s->%s %s->%s" % (tid, orighash, newhash, origuni, newuni))
+ self.rqdata.runtaskentries[tid].hash = newhash
+ self.rqdata.runtaskentries[tid].unihash = newuni
+ changed.add(tid)
+
next |= self.rqdata.runtaskentries[tid].revdeps
- changed.add(tid)
total.remove(tid)
next.intersection_update(total)
@@ -2307,18 +2321,11 @@ class RunQueueExecute:
self.pending_migrations.add(tid)
for tid in self.pending_migrations.copy():
- if tid in self.runq_running:
+ if tid in self.runq_running or tid in self.sq_live:
# Too late, task already running, not much we can do now
self.pending_migrations.remove(tid)
continue
- if tid in self.scenequeue_covered or tid in self.sq_live:
- # Already ran this setscene task or it running
- # Potentially risky, should we report this hash as a match?
- logger.info("Already covered setscene for %s so ignoring rehash" % (tid))
- self.pending_migrations.remove(tid)
- continue
-
valid = True
# Check no tasks this covers are running
for dep in self.sqdata.sq_covered_tasks[tid]: