summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-01-19 17:50:33 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-09 23:15:15 +0000
commit023d0efb97b55626ebdfbf8c54195d8e60f74615 (patch)
treeecb73f449e9f0a1639f3bd3fee73e631b776dbff /meta
parenteac9612ccdf0ee2675079d6a9cb044cb02e3538e (diff)
downloadpoky-023d0efb97b55626ebdfbf8c54195d8e60f74615.tar.gz
sstate: Improve failure to obtain archive message/handling
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. (From OE-Core rev: 25a7e8dae10dde6073dcdd80f1e2448b59dc9d1a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 7875baeca7a3ed216b2442fb8771e51efbfa5a4f) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/sstate.bbclass4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 566a58dafb..103de01264 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -788,7 +788,9 @@ def sstate_setscene(d):
788 shared_state = sstate_state_fromvars(d) 788 shared_state = sstate_state_fromvars(d)
789 accelerate = sstate_installpkg(shared_state, d) 789 accelerate = sstate_installpkg(shared_state, d)
790 if not accelerate: 790 if not accelerate:
791 bb.fatal("No suitable staging package found") 791 msg = "No sstate archive obtainable, will run full task instead."
792 bb.warn(msg)
793 raise bb.BBHandledException(msg)
792 794
793python sstate_task_prefunc () { 795python sstate_task_prefunc () {
794 shared_state = sstate_state_fromvars(d) 796 shared_state = sstate_state_fromvars(d)