summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2016-05-12 14:31:58 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-14 23:05:12 +0100
commit97531efe4d37c25143f46f2761a15ee5324952d2 (patch)
tree3389fd41cb23e5c1ee910a649a3ad125b11a1b58
parent0ba9ce24d5e2fc970eac462d1619dce2081502e3 (diff)
downloadpoky-97531efe4d37c25143f46f2761a15ee5324952d2.tar.gz
report-error: Replace the build directory path in the error text
Replace the TOPDIR in the output error file so that the error report once submitted can then be more easily matched to find duplicate error reports. This also reduces the need to manually redact any information that might be in the error log path such as hostnames or home directories. (From OE-Core rev: ffdc9550c109facf3a3ebdf90c1ba8153cac90dd) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/report-error.bbclass5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/classes/report-error.bbclass b/meta/classes/report-error.bbclass
index 82b5bcd690..20d2bef797 100644
--- a/meta/classes/report-error.bbclass
+++ b/meta/classes/report-error.bbclass
@@ -58,6 +58,11 @@ python errorreport_handler () {
58 try: 58 try:
59 logFile = codecs.open(log, 'r', 'utf-8') 59 logFile = codecs.open(log, 'r', 'utf-8')
60 logdata = logFile.read() 60 logdata = logFile.read()
61
62 topdir = e.data.getVar('TOPDIR', True)
63 if topdir:
64 logdata = logdata.replace(topdir, ' ')
65
61 logFile.close() 66 logFile.close()
62 except: 67 except:
63 logdata = "Unable to read log file" 68 logdata = "Unable to read log file"