From: "João Henrique Ferreira de Freitas" <joaohf@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 1/2] report-error: sending error report to server without user intervention
Date: Wed, 12 Nov 2014 21:08:38 -0200 [thread overview]
Message-ID: <1415833719-6255-2-git-send-email-joaohf@gmail.com> (raw)
In-Reply-To: <1415833719-6255-1-git-send-email-joaohf@gmail.com>
If ERR_REPORT_SERVER is set to a server which has a running instance of
Error Reporting Tool, then that server will be used to send error
reports.
Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
---
meta/classes/report-error.bbclass | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/meta/classes/report-error.bbclass b/meta/classes/report-error.bbclass
index 5fe2355..f9e821f 100644
--- a/meta/classes/report-error.bbclass
+++ b/meta/classes/report-error.bbclass
@@ -7,6 +7,7 @@
# Licensed under the MIT license, see COPYING.MIT for details
ERR_REPORT_DIR ?= "${LOG_DIR}/error-report"
+ERR_REPORT_SERVER ?= ""
def errorreport_getdata(e):
logpath = e.data.getVar('ERR_REPORT_DIR', True)
@@ -24,6 +25,16 @@ def errorreport_savedata(e, newdata, file):
json.dump(newdata, f, indent=4, sort_keys=True)
return datafile
+def errorreport_senddata(e, datafile):
+ import subprocess
+ server = e.data.getVar('ERR_REPORT_SERVER', True)
+ if server:
+ cmd = 'send-error-report %s %s' % (datafile, server)
+ subprocess.call(cmd, shell=True)
+ else:
+ bb.note("The errors for this build are stored in %s\nYou can send the errors to an upstream server by running:\n send-error-report %s [server]" % (datafile, datafile))
+ bb.note("The contents of these logs will be posted in public if you use the above command with the default server. If you need to do so, please ensure you remove any identifying or proprietary information before sending.")
+
python errorreport_handler () {
import json
--
1.9.1
next prev parent reply other threads:[~2014-11-12 23:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-12 23:08 [PATCH 0/2] reporter-error sending report João Henrique Ferreira de Freitas
2014-11-12 23:08 ` João Henrique Ferreira de Freitas [this message]
2014-11-12 23:08 ` [PATCH 2/2] report-error: send report error with username and email João Henrique Ferreira de Freitas
2014-11-13 12:58 ` [PATCH 0/2] reporter-error sending report Martin Jansa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1415833719-6255-2-git-send-email-joaohf@gmail.com \
--to=joaohf@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox