]> code.ossystems Code Review - openembedded-core.git/commitdiff
report-error: Replace the build directory path in the error text
authorMichael Wood <michael.g.wood@intel.com>
Thu, 12 May 2016 13:31:58 +0000 (14:31 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 14 May 2016 06:26:40 +0000 (07:26 +0100)
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.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/report-error.bbclass

index 82b5bcd69054e9027ba7233eb310b5aa34833610..20d2bef797fbafb9dcb62c48fd7e7ed00fcaeacc 100644 (file)
@@ -58,6 +58,11 @@ python errorreport_handler () {
                 try:
                     logFile = codecs.open(log, 'r', 'utf-8')
                     logdata = logFile.read()
+
+                    topdir = e.data.getVar('TOPDIR', True)
+                    if topdir:
+                        logdata = logdata.replace(topdir, ' ')
+
                     logFile.close()
                 except:
                     logdata = "Unable to read log file"