]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
sstate: Add check_for_interrupts() call functionality added in bitbake
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 22 Feb 2023 13:34:59 +0000 (13:34 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 23 Feb 2023 12:12:14 +0000 (12:12 +0000)
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.purdie@linuxfoundation.org>
meta/classes-global/sstate.bbclass
meta/conf/sanity.conf

index 567de4aba4da3420fd28cefa56110d2c540f4249..5b63582b5ae9f16ed2ad199459e0858916f37a7b 100644 (file)
@@ -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)
 }
index fff1ad8246b933958d8861b806b120ec9e5ac70d..593419921f52c3f223d4acc23ba8d050bf8e3fb3 100644 (file)
@@ -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"