summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-07-12 10:23:18 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-20 10:28:46 +0100
commit65a0c274833ac84953458547dd01d70bd881b6bb (patch)
tree03f143a1d30e481f51e75a29ffd0518792c914f5 /meta/classes
parent3ad542a85ab2b2ccc1f048ea76d298155d69b3ba (diff)
downloadpoky-65a0c274833ac84953458547dd01d70bd881b6bb.tar.gz
report-error: replace build paths with markers not whitespace
To remove potentially personal information and reduce irrelevant noise when searching for similar reports the error reporting class removes ${TOPDIR} from the logs. Whilst this is valid intention, the replacement of ' ' results in potentially confusing logs as it appears that builds are happening in /tmp, or whitespace can appear in places where it isn't allowed which can look like a bug. Solve both of these by replacing the value of TOPDIR with the literal string TOPDIR. Also replace TMPDIR after TOPDIR, as it's not uncommon to have TMPDIR somewhere other than directly under TOPDIR. (From OE-Core rev: 95794e261628f83ddab0aa7b8bafb6409cc9deb5) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/report-error.bbclass8
1 files changed, 5 insertions, 3 deletions
diff --git a/meta/classes/report-error.bbclass b/meta/classes/report-error.bbclass
index 5cbf8f07fd..c8c15bdafa 100644
--- a/meta/classes/report-error.bbclass
+++ b/meta/classes/report-error.bbclass
@@ -59,9 +59,11 @@ python errorreport_handler () {
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 61
62 topdir = e.data.getVar('TOPDIR', True) 62 # Replace host-specific paths so the logs are cleaner
63 if topdir: 63 for d in ("TOPDIR", "TMPDIR"):
64 logdata = logdata.replace(topdir, ' ') 64 s = e.data.getVar(d, True)
65 if s:
66 logdata = logdata.replace(s, d)
65 67
66 logFile.close() 68 logFile.close()
67 except: 69 except: