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.w...@intel.com>
---
 meta/classes/report-error.bbclass | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/classes/report-error.bbclass 
b/meta/classes/report-error.bbclass
index 82b5bcd..20d2bef 100644
--- a/meta/classes/report-error.bbclass
+++ b/meta/classes/report-error.bbclass
@@ -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"
-- 
2.7.4

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to