Add in the new 'check' calls which mean that the code can exit from longer
running code loops if requested by the user. This covers sstate checks and
sstate manifest cleanup code which currently couldn't be interrupted by the
user from the UI.

Increase the minimum bitbake version which brings in this API.

Signed-off-by: Richard Purdie <richard.pur...@linuxfoundation.org>
---
 meta/classes-global/sstate.bbclass | 3 +++
 meta/conf/sanity.conf              | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/classes-global/sstate.bbclass 
b/meta/classes-global/sstate.bbclass
index 567de4aba4d..5b63582b5ae 100644
--- a/meta/classes-global/sstate.bbclass
+++ b/meta/classes-global/sstate.bbclass
@@ -1023,6 +1023,7 @@ def sstate_checkhashes(sq_data, d, siginfo=False, 
currentcount=0, summary=True,
 
             if progress:
                 bb.event.fire(bb.event.ProcessProgress(msg, 
next(cnt_tasks_done)), d)
+            bb.event.check_for_interrupts(d)
 
         tasklist = []
         for tid in missed:
@@ -1296,6 +1297,7 @@ python sstate_eventhandler_reachablestamps() {
                 lines.remove(r)
                 removed = removed + 1
                 bb.event.fire(bb.event.ProcessProgress(msg, removed), d)
+                bb.event.check_for_interrupts(d)
 
             bb.event.fire(bb.event.ProcessFinished(msg), d)
 
@@ -1365,6 +1367,7 @@ python sstate_eventhandler_stalesstate() {
                     bb.utils.remove(stamp)
                 removed = removed + 1
                 bb.event.fire(bb.event.ProcessProgress(msg, removed), d)
+                bb.event.check_for_interrupts(d)
 
             bb.event.fire(bb.event.ProcessFinished(msg), d)
 }
diff --git a/meta/conf/sanity.conf b/meta/conf/sanity.conf
index fff1ad8246b..593419921f5 100644
--- a/meta/conf/sanity.conf
+++ b/meta/conf/sanity.conf
@@ -3,7 +3,7 @@
 # See sanity.bbclass
 #
 # Expert users can confirm their sanity with "touch conf/sanity.conf"
-BB_MIN_VERSION = "2.0.1"
+BB_MIN_VERSION = "2.3.1"
 
 SANITY_ABIFILE = "${TMPDIR}/abi_version"
 
-- 
2.37.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177572): 
https://lists.openembedded.org/g/openembedded-core/message/177572
Mute This Topic: https://lists.openembedded.org/mt/97160909/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to