summaryrefslogtreecommitdiffstats
path: root/meta/classes/report-error.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* report-error.bbclass: Add layer and bitbake version info to error reportMilan Shah2021-03-101-0/+4
| | | | | | | | | | | | | | | | Instead of just providing local.conf info, add layer names and their revisions with bitbake version information into error report makes it easier to understand and reproduce failed build. [YOCTO #9700] (From OE-Core rev: b6d941126e92e26ae26cc4550c6849829eb88af9) Signed-off-by: Milan Shah <mshah@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit a5afd7b1857c0012ab6e3d8bbafa67a96ff9e9e0) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* report-error.bbclass: Use with to control file handle lifetimeOla x Nilsson2019-10-231-6/+2
| | | | | | | (From OE-Core rev: ab108dfc690fb95b66f1c6243ff165f0849fa2b1) Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* report-error.bbclass: add local.conf/auto.conf into error reportChangqing Li2019-09-191-0/+15
| | | | | | | | | | | | | | | | sometimes, it is not enough to reproduce a failed build with current info on error reports web, add local.conf/auto.conf into error report to make it more easier to reproduce failed build Note: this need work together with change in repo error-report-web, which will display local.conf and auto.conf as Error Details [YOCTO #13252] (From OE-Core rev: 7adf9707c04d8ef6bcd8d8bda555687f705e6ee6) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* report-error: provide distro identifier string in case of uninative buildLeonardo Sandoval2017-08-181-1/+8
| | | | | | | | | | | | | Besides providing the NATIVELSBSTRING, include distro info when creating the (json) error report. This information provides better info than the standard 'universal*' string for uninative builds. [YOCTO #11824] (From OE-Core rev: fdfbfc954a3e0ad79dc2bed9828f9f5dc40d506f) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: remove True option to getVar callsJoshua Lock2016-12-161-11/+11
| | | | | | | | | | | | | getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* report-error: Fix tracebacksRichard Purdie2016-08-171-1/+1
| | | | | | | | | | Currently the code gives tracebacks if there are no recipes to be built in a BuildStarted event. Parse the list into a string rather than just taking the first item. There is nothing special about the first time. (From OE-Core rev: 684a3d56ef393b56f38d3272f8865f6225a282ab) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* report-error: replace build paths with markers not whitespaceRoss Burton2016-07-201-3/+5
| | | | | | | | | | | | | | | | | | | | 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>
* classes/lib: Complete transition to python3Richard Purdie2016-06-021-1/+1
| | | | | | | | | This patch contains all the other misc pieces of the transition to python3 which didn't make sense to be broken into individual patches. (From OE-Core rev: fcd6b38bab8517d83e1ed48eef1bca9a9a190f57) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* report-error: Replace the build directory path in the error textMichael Wood2016-05-141-0/+5
| | | | | | | | | | | | 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>
* report-error.bbclass: Support Unicode reportsMariano Lopez2015-10-071-4/+7
| | | | | | | | | | | | | | | | | Currently error-report doesn't manage Unicode because the files are opened with the default codec. This patch changes the codec of the files to UTF-8, this way the reports will include Unicode characters. This is useful for the qemu output when doing the testimage task. [YOCTO #8225] (From OE-Core rev: afb5308770de776181da5b44f9dc30922836bc38) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* report-error: send only last 5242000 characters in error logsMartin Jansa2015-09-061-3/+12
| | | | | | | | | * otherwise whole build report submission is rejected because it's too big (From OE-Core rev: 3544b4d4d72330eb12bb3cda25cb99ed52c8a2eb) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* report-error: expand all variablesRoss Burton2015-07-091-4/+4
| | | | | | | | | | | BUILDNAME is now composed from ${DATE} and ${TIME} so needs to be expanded to useful. Whilst fixing this some other variables were explicitly not expanded for no clear reason, so expand those too. (From OE-Core rev: d45f818026429b70d90fb3ae8e017db6516dca44) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* report-error.bbclass: Added file syncronization.Mariano Lopez2015-07-081-1/+10
| | | | | | | | | | | | | | | errorreport_handler would fail if several errors are triggered at the same time because of two proccess writting to the same file. This patch add the required syncronization to handle concurrent process. [YP #7899] (From OE-Core rev: 8b20eaf7cbadd0cd87cfa192d60ca1b7da435216) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Add explict getVar param for (non) expansionRichard Purdie2015-06-231-4/+4
| | | | | | | | | | | | | | Rather than just use d.getVar(X), use the more explict d.getVar(X, False) since at some point in the future, having the default of expansion would be nice. This is the first step towards that. This patch was mostly made using the command: sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *` (From OE-Core rev: ab7c1d239b122c8e549e8112c88fd46c9e2b061b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* report-error: Update information on the submission processMichael Wood2015-03-101-2/+2
| | | | | | | | | | | The new send-error-report will prompt for review of items and the server is now specified by using the -s argument. (From OE-Core rev: c195d70f35ea522854dcdd53aeae60eec6b7ad7e) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* report-error: Catch un-readable log dataMichael Wood2015-02-031-3/+7
| | | | | | | | | | | If a log data cannot be decoded to utf-8 or read then handle this gracefully. This can happen if a log file contains binary or something goes wrong with the file open process. (From OE-Core rev: 787ffc5e12f1639aa5e0917bb23deced53a0478e) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* report-error: Handle the case no logfile existsRichard Purdie2014-12-211-3/+6
| | | | | | | | | If the task fails early, no error log may exist. Currently we crash in that case, this handles the situation more gracefully. (From OE-Core rev: 1e6bfcab47f532677f87683ba2f5e5fb905e9ba5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/report-error: tweak summary messagePaul Eggleton2014-06-291-2/+2
| | | | | | | | | | | | * We don't want everyone to remove their identifying info, just if they feel the need to * Split lines for clarity * A couple of grammar/spelling tweaks (From OE-Core rev: b5c7538416e4c7a9e594edf930fa7ee844a347e6) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* report-error: Add posting in the public noteSaul Wold2014-04-241-0/+1
| | | | | | | (From OE-Core rev: c2eb5cd1aa4632f7ee8c261414e599dcb6f40a8b) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* report-error.bbclass: new class to save build information when errors occurAndreea Proca2014-02-141-0/+66
Class is used to save data about errors after every task that failed. Errors saved as json files in ERROR_REPORT_DIR (defaults to tmp/log/error-report). To use this class one has to add INHERIT += "report-error" to local.conf. scripts/send-error-report is a simple script that sends the json file to a HTTP server that collects data (git://git.yoctoproject.org/error-report-web is a Django web interface that can be used to receive and visualize the error reports). The script will give you an URL where you can find your report. (From OE-Core rev: f186b4c7c6c975638e60b30a512d669dc6dc390f) Signed-off-by: Andreea Proca <andreea.b.proca@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>