summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Shah <mshah@mvista.com>2021-01-06 19:08:37 +0530
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-03-10 00:22:51 +0000
commita40648f03d4a6058f2bd064b8c2449189d289cb8 (patch)
tree1f4cb9e0139a3ae670ff2064fa3bfb85a91b7be8
parentf9d9cad4c98e12d77899da8fb577f1a5499dbf41 (diff)
downloadpoky-a40648f03d4a6058f2bd064b8c2449189d289cb8.tar.gz
report-error.bbclass: Add layer and bitbake version info to error report
Instead of just providing local.conf info, add layer names and their revisions with bitbake version information into error report makes it easier to understand and reproduce failed build. [YOCTO #9700] (From OE-Core rev: b6d941126e92e26ae26cc4550c6849829eb88af9) Signed-off-by: Milan Shah <mshah@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit a5afd7b1857c0012ab6e3d8bbafa67a96ff9e9e0) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/report-error.bbclass4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/report-error.bbclass b/meta/classes/report-error.bbclass
index 1a12db1206..9cb6b0bd31 100644
--- a/meta/classes/report-error.bbclass
+++ b/meta/classes/report-error.bbclass
@@ -6,6 +6,8 @@
6# 6#
7# Licensed under the MIT license, see COPYING.MIT for details 7# Licensed under the MIT license, see COPYING.MIT for details
8 8
9inherit base
10
9ERR_REPORT_DIR ?= "${LOG_DIR}/error-report" 11ERR_REPORT_DIR ?= "${LOG_DIR}/error-report"
10 12
11def errorreport_getdata(e): 13def errorreport_getdata(e):
@@ -64,6 +66,8 @@ python errorreport_handler () {
64 data['failures'] = [] 66 data['failures'] = []
65 data['component'] = " ".join(e.getPkgs()) 67 data['component'] = " ".join(e.getPkgs())
66 data['branch_commit'] = str(base_detect_branch(e.data)) + ": " + str(base_detect_revision(e.data)) 68 data['branch_commit'] = str(base_detect_branch(e.data)) + ": " + str(base_detect_revision(e.data))
69 data['bitbake_version'] = e.data.getVar("BB_VERSION")
70 data['layer_version'] = get_layers_branch_rev(e.data)
67 data['local_conf'] = get_conf_data(e, 'local.conf') 71 data['local_conf'] = get_conf_data(e, 'local.conf')
68 data['auto_conf'] = get_conf_data(e, 'auto.conf') 72 data['auto_conf'] = get_conf_data(e, 'auto.conf')
69 lock = bb.utils.lockfile(datafile + '.lock') 73 lock = bb.utils.lockfile(datafile + '.lock')