diff options
-rw-r--r-- | meta/classes/report-error.bbclass | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/meta/classes/report-error.bbclass b/meta/classes/report-error.bbclass index 1c55abfbf3..ea043b23e1 100644 --- a/meta/classes/report-error.bbclass +++ b/meta/classes/report-error.bbclass | |||
@@ -25,6 +25,19 @@ def errorreport_savedata(e, newdata, file): | |||
25 | json.dump(newdata, f, indent=4, sort_keys=True) | 25 | json.dump(newdata, f, indent=4, sort_keys=True) |
26 | return datafile | 26 | return datafile |
27 | 27 | ||
28 | def get_conf_data(e, filename): | ||
29 | builddir = e.data.getVar('TOPDIR') | ||
30 | filepath = os.path.join(builddir, "conf", filename) | ||
31 | jsonstring = "" | ||
32 | if os.path.exists(filepath): | ||
33 | with open(filepath, 'r') as f: | ||
34 | for line in f.readlines(): | ||
35 | if line.startswith("#") or len(line.strip()) == 0: | ||
36 | continue | ||
37 | else: | ||
38 | jsonstring=jsonstring + line | ||
39 | return jsonstring | ||
40 | |||
28 | python errorreport_handler () { | 41 | python errorreport_handler () { |
29 | import json | 42 | import json |
30 | import codecs | 43 | import codecs |
@@ -51,6 +64,8 @@ python errorreport_handler () { | |||
51 | data['failures'] = [] | 64 | data['failures'] = [] |
52 | data['component'] = " ".join(e.getPkgs()) | 65 | data['component'] = " ".join(e.getPkgs()) |
53 | data['branch_commit'] = str(base_detect_branch(e.data)) + ": " + str(base_detect_revision(e.data)) | 66 | data['branch_commit'] = str(base_detect_branch(e.data)) + ": " + str(base_detect_revision(e.data)) |
67 | data['local_conf'] = get_conf_data(e, 'local.conf') | ||
68 | data['auto_conf'] = get_conf_data(e, 'auto.conf') | ||
54 | lock = bb.utils.lockfile(datafile + '.lock') | 69 | lock = bb.utils.lockfile(datafile + '.lock') |
55 | errorreport_savedata(e, data, "error-report.txt") | 70 | errorreport_savedata(e, data, "error-report.txt") |
56 | bb.utils.unlockfile(lock) | 71 | bb.utils.unlockfile(lock) |