summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-03-24 11:00:04 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-04-06 09:31:24 +0100
commit9982b2c0f2a4bf6d451b532856ca6cf126985f22 (patch)
tree811590ad5eb2ab18891e2144032e879b7b775920
parent232cb7b0553f844be695d26f55aaf531029a6a9a (diff)
downloadpoky-9982b2c0f2a4bf6d451b532856ca6cf126985f22.tar.gz
poky-9982b2c0f2a4bf6d451b532856ca6cf126985f22.tar.bz2
poky-9982b2c0f2a4bf6d451b532856ca6cf126985f22.zip
bitbake: runqueue: Further fixes for confused setscene tasks
There is further evidence of tasks ending up being "covered" and "notcovered" which shouldn't happen and is bad. The code that caused this problem last time appears to have issues where stamps for tasks already exist. Split out the setscene stamp checking code to a separate function and use this when checking "hard dependencies" (like pseudo-native) so that if the stamps exist and it will be "covered", it is not put on the notcovered list. (Bitbake rev: a1848a481e36b729c8e4130c394b1d462d4b488a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/runqueue.py39
1 files changed, 26 insertions, 13 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 80d7f6ca6b..cd56a55472 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -2457,6 +2457,9 @@ class RunQueueExecute:
if dep in self.scenequeue_covered or dep in self.scenequeue_notcovered:
# dependency could be already processed, e.g. noexec setscene task
continue
+ noexec, stamppresent = check_setscene_stamps(dep, self.rqdata, self.rq, self.stampcache)
+ if noexec or stamppresent:
+ continue
logger.debug2("%s was unavailable and is a hard dependency of %s so skipping" % (task, dep))
self.sq_task_failoutright(dep)
continue
@@ -2795,6 +2798,26 @@ def build_scenequeue_data(sqdata, rqdata, rq, cooker, stampcache, sqrq):
event = bb.event.StaleSetSceneTasks(found[mc])
bb.event.fire(event, cooker.databuilder.mcdata[mc])
+def check_setscene_stamps(tid, rqdata, rq, stampcache, noexecstamp=False):
+
+ (mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
+
+ taskdep = rqdata.dataCaches[mc].task_deps[taskfn]
+
+ if 'noexec' in taskdep and taskname in taskdep['noexec']:
+ bb.build.make_stamp(taskname + "_setscene", rqdata.dataCaches[mc], taskfn)
+ return True, False
+
+ if rq.check_stamp_task(tid, taskname + "_setscene", cache=stampcache):
+ logger.debug2('Setscene stamp current for task %s', tid)
+ return False, True
+
+ if rq.check_stamp_task(tid, taskname, recurse = True, cache=stampcache):
+ logger.debug2('Normal stamp current for task %s', tid)
+ return False, True
+
+ return False, False
+
def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq, summary=True):
tocheck = set()
@@ -2805,24 +2828,14 @@ def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq, s
if tid in sqdata.valid:
sqdata.valid.remove(tid)
- (mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
-
- taskdep = rqdata.dataCaches[mc].task_deps[taskfn]
+ noexec, stamppresent = check_setscene_stamps(tid, rqdata, rq, stampcache, noexecstamp=True)
- if 'noexec' in taskdep and taskname in taskdep['noexec']:
+ if noexec:
sqdata.noexec.add(tid)
sqrq.sq_task_skip(tid)
- bb.build.make_stamp(taskname + "_setscene", rqdata.dataCaches[mc], taskfn)
- continue
-
- if rq.check_stamp_task(tid, taskname + "_setscene", cache=stampcache):
- logger.debug2('Setscene stamp current for task %s', tid)
- sqdata.stamppresent.add(tid)
- sqrq.sq_task_skip(tid)
continue
- if rq.check_stamp_task(tid, taskname, recurse = True, cache=stampcache):
- logger.debug2('Normal stamp current for task %s', tid)
+ if stamppresent:
sqdata.stamppresent.add(tid)
sqrq.sq_task_skip(tid)
continue