]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
sstate: Improve failure to obtain archive message/handling
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 19 Jan 2022 17:50:33 +0000 (17:50 +0000)
committerAnuj Mittal <anuj.mittal@intel.com>
Fri, 4 Feb 2022 03:10:41 +0000 (11:10 +0800)
The bb.fatal() case where sstate failed to find/use an archive in setcene tasks
is suboptimal. Bitbakes handling of setscene tasks will be to warn but the fatal
will turn this into an error, despite the real task being rerun.

In these failure cases other messages would usually have been printed so turn
this into a warning and raise a handled exception status so that bitbake knows
to fail the task but not print more messages.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 7875baeca7a3ed216b2442fb8771e51efbfa5a4f)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
meta/classes/sstate.bbclass

index 566a58dafba8c4b08e4cb5c654368efeb7bfb6e8..103de01264f3066ad1785a0d964d1ffb68de65cc 100644 (file)
@@ -788,7 +788,9 @@ def sstate_setscene(d):
     shared_state = sstate_state_fromvars(d)
     accelerate = sstate_installpkg(shared_state, d)
     if not accelerate:
-        bb.fatal("No suitable staging package found")
+        msg = "No sstate archive obtainable, will run full task instead."
+        bb.warn(msg)
+        raise bb.BBHandledException(msg)
 
 python sstate_task_prefunc () {
     shared_state = sstate_state_fromvars(d)