aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2021-10-14 17:33:19 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-17 12:14:29 +0100
commit50d99faf88a1d82cbd939b9bd6e33ebed2b1ffd8 (patch)
tree9b7ddc1910997dfe95bafbdaf8d01bf823e95335
parent2f1ea25c222b344dd8b784b2bc73a6540ab30274 (diff)
downloadopenembedded-core-contrib-50d99faf88a1d82cbd939b9bd6e33ebed2b1ffd8.tar.gz
openembedded-core-contrib-50d99faf88a1d82cbd939b9bd6e33ebed2b1ffd8.tar.bz2
openembedded-core-contrib-50d99faf88a1d82cbd939b9bd6e33ebed2b1ffd8.zip
sstate: don't silently handle all exceptions in sstate_checkhashes
If checkstatus returns an exception we should silently handle FetchError, as this means the fetch failed for 'normal' reasons such as file not found. However, other exceptions may be raised, and these should be made visible. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/sstate.bbclass7
1 files changed, 4 insertions, 3 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 7f034d746a8..3c179259e74 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -995,10 +995,11 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True,
foundNet.add(tid)
if tid in missed:
missed.remove(tid)
- except:
+ except bb.fetch2.FetchError as e:
missed.add(tid)
- bb.debug(2, "SState: Unsuccessful fetch test for %s" % srcuri)
- pass
+ bb.debug(2, "SState: Unsuccessful fetch test for %s (%s)" % (srcuri, e))
+ except Exception as e:
+ bb.error("SState: cannot test %s: %s" % (srcuri, e))
if len(tasklist) >= min_tasks:
bb.event.fire(bb.event.ProcessProgress(msg, len(tasklist) - thread_worker.tasks.qsize()), d)