diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-04-30 00:03:37 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-05-01 22:51:06 +0100 |
commit | 76891afd76679b00ac620070cd90c9d53c7f6262 (patch) | |
tree | 5e29ca3855a2b1801c1ba86fb5174ebeee1434b2 /bitbake | |
parent | f3e1a668fbe72551ec73d3f2e610390358665b1e (diff) | |
download | poky-76891afd76679b00ac620070cd90c9d53c7f6262.tar.gz |
bitbake: runqueue: Fix multiconfig deferred task sstate validity caching issue
We were testing the validity of deferred tasks setscene status "up front" which
is very unlikely to succeed and leads to cache invalidation issues. With the
change to rebuild the deferred task list, this status becomes out of sync. The
result was tasks being executed when they should not have been leading to extra
work for the build unnecessarily.
Instead, don't process validity status for deferred tasks and assume their
data will become available. If it doesn't, this will now result in a build
error as the setscene task will fail and the main task will run instead.
In theory we could try and track the state changes in the deferred list and
re-test validity then but I'm not sure it is worth the effort when the other
code path and errors in setscene tasks will give a pretty good idea of what
is happening anyway.
(Bitbake rev: edcafac13b3b241b6687419e59018d21811507a1)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index feb42d3e6b..78e576eb2c 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -2030,8 +2030,6 @@ class RunQueueExecute: | |||
2030 | logger.debug("%s didn't become valid, skipping setscene" % nexttask) | 2030 | logger.debug("%s didn't become valid, skipping setscene" % nexttask) |
2031 | self.sq_task_failoutright(nexttask) | 2031 | self.sq_task_failoutright(nexttask) |
2032 | return True | 2032 | return True |
2033 | else: | ||
2034 | self.sqdata.outrightfail.remove(nexttask) | ||
2035 | if nexttask in self.sqdata.outrightfail: | 2033 | if nexttask in self.sqdata.outrightfail: |
2036 | logger.debug2('No package found, so skipping setscene task %s', nexttask) | 2034 | logger.debug2('No package found, so skipping setscene task %s', nexttask) |
2037 | self.sq_task_failoutright(nexttask) | 2035 | self.sq_task_failoutright(nexttask) |
@@ -2827,6 +2825,8 @@ def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq, s | |||
2827 | sqdata.stamppresent.remove(tid) | 2825 | sqdata.stamppresent.remove(tid) |
2828 | if tid in sqdata.valid: | 2826 | if tid in sqdata.valid: |
2829 | sqdata.valid.remove(tid) | 2827 | sqdata.valid.remove(tid) |
2828 | if tid in sqdata.outrightfail: | ||
2829 | sqdata.outrightfail.remove(tid) | ||
2830 | 2830 | ||
2831 | noexec, stamppresent = check_setscene_stamps(tid, rqdata, rq, stampcache, noexecstamp=True) | 2831 | noexec, stamppresent = check_setscene_stamps(tid, rqdata, rq, stampcache, noexecstamp=True) |
2832 | 2832 | ||
@@ -2861,10 +2861,10 @@ def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq, s | |||
2861 | if tid in sqrq.scenequeue_covered: | 2861 | if tid in sqrq.scenequeue_covered: |
2862 | continue | 2862 | continue |
2863 | 2863 | ||
2864 | sqdata.outrightfail.add(tid) | ||
2865 | |||
2866 | h = pending_hash_index(tid, rqdata) | 2864 | h = pending_hash_index(tid, rqdata) |
2867 | if h not in sqdata.hashes: | 2865 | if h not in sqdata.hashes: |
2866 | if tid in tids: | ||
2867 | sqdata.outrightfail.add(tid) | ||
2868 | sqdata.hashes[h] = tid | 2868 | sqdata.hashes[h] = tid |
2869 | else: | 2869 | else: |
2870 | sqrq.sq_deferred[tid] = sqdata.hashes[h] | 2870 | sqrq.sq_deferred[tid] = sqdata.hashes[h] |