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:
2283 for dep in self.rqdata.runtaskentries[tid].depends: 2283 for dep in self.rqdata.runtaskentries[tid].depends:
2284 procdep.append(dep) 2284 procdep.append(dep)
2285 orighash = self.rqdata.runtaskentries[tid].hash 2285 orighash = self.rqdata.runtaskentries[tid].hash
2286 self.rqdata.runtaskentries[tid].hash = bb.parse.siggen.get_taskhash(tid, procdep, self.rqdata.dataCaches[mc_from_tid(tid)]) 2286 newhash = bb.parse.siggen.get_taskhash(tid, procdep, self.rqdata.dataCaches[mc_from_tid(tid)])
2287 origuni = self.rqdata.runtaskentries[tid].unihash 2287 origuni = self.rqdata.runtaskentries[tid].unihash
2288 self.rqdata.runtaskentries[tid].unihash = bb.parse.siggen.get_unihash(tid) 2288 newuni = bb.parse.siggen.get_unihash(tid)
2289 logger.debug(1, "Task %s hash changes: %s->%s %s->%s" % (tid, orighash, self.rqdata.runtaskentries[tid].hash, origuni, self.rqdata.runtaskentries[tid].unihash)) 2289 # FIXME, need to check it can come from sstate at all for determinism?
2290 remapped = False
2291 if newuni == origuni:
2292 # Nothing to do, we match, skip code below
2293 remapped = True
2294 elif tid in self.scenequeue_covered or tid in self.sq_live:
2295 # Already ran this setscene task or it running. Report the new taskhash
2296 remapped = bb.parse.siggen.report_unihash_equiv(tid, newhash, origuni, newuni, self.rqdata.dataCaches)
2297 logger.info("Already covered setscene for %s so ignoring rehash (remap)" % (tid))
2298
2299 if not remapped:
2300 logger.debug(1, "Task %s hash changes: %s->%s %s->%s" % (tid, orighash, newhash, origuni, newuni))
2301 self.rqdata.runtaskentries[tid].hash = newhash
2302 self.rqdata.runtaskentries[tid].unihash = newuni
2303 changed.add(tid)
2304
2290 next |= self.rqdata.runtaskentries[tid].revdeps 2305 next |= self.rqdata.runtaskentries[tid].revdeps
2291 changed.add(tid)
2292 total.remove(tid) 2306 total.remove(tid)
2293 next.intersection_update(total) 2307 next.intersection_update(total)
2294 2308
@@ -2307,18 +2321,11 @@ class RunQueueExecute:
2307 self.pending_migrations.add(tid) 2321 self.pending_migrations.add(tid)
2308 2322
2309 for tid in self.pending_migrations.copy(): 2323 for tid in self.pending_migrations.copy():
2310 if tid in self.runq_running: 2324 if tid in self.runq_running or tid in self.sq_live:
2311 # Too late, task already running, not much we can do now 2325 # Too late, task already running, not much we can do now
2312 self.pending_migrations.remove(tid) 2326 self.pending_migrations.remove(tid)
2313 continue 2327 continue
2314 2328
2315 if tid in self.scenequeue_covered or tid in self.sq_live:
2316 # Already ran this setscene task or it running
2317 # Potentially risky, should we report this hash as a match?
2318 logger.info("Already covered setscene for %s so ignoring rehash" % (tid))
2319 self.pending_migrations.remove(tid)
2320 continue
2321
2322 valid = True 2329 valid = True
2323 # Check no tasks this covers are running 2330 # Check no tasks this covers are running
2324 for dep in self.sqdata.sq_covered_tasks[tid]: 2331 for dep in self.sqdata.sq_covered_tasks[tid]: