summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Laine <jeremy.laine@m4x.org>2008-05-23 08:50:10 +0000
committerJeremy Laine <jeremy.laine@m4x.org>2008-05-23 08:50:10 +0000
commit197bd064d5e8e08e8d3112a7765d5147da1b3e3a (patch)
tree0aa6d949414be08a56719ba31f78a979f3206c00
parentcb83a6bca54db8e769e1122d8bce0d101a78da5b (diff)
seppuku.bbclass,oestats-client.bbclass: add bug number and tracker to oestats
-rw-r--r--classes/oestats-client.bbclass9
-rw-r--r--classes/seppuku.bbclass5
2 files changed, 11 insertions, 3 deletions
diff --git a/classes/oestats-client.bbclass b/classes/oestats-client.bbclass
index ed81a0377e..25388f4636 100644
--- a/classes/oestats-client.bbclass
+++ b/classes/oestats-client.bbclass
@@ -44,7 +44,7 @@ def oestats_send(server, action, vars = {}, files = {}):
# build headers
headers = {
- "User-agent": "oestats-client/0.4",
+ "User-agent": "oestats-client/0.5",
"Content-type": "multipart/form-data; boundary=%s" % bound,
"Content-length": str(len(body))}
@@ -66,8 +66,9 @@ def oestats_start(server, builder, d):
try:
data = oestats_send(server, "/builds/", {
'builder': builder,
- 'branch': bb.data.getVar('METADATA_BRANCH', d, True),
- 'revision': bb.data.getVar('METADATA_REVISION', d, True),
+ 'build_arch': bb.data.getVar('BUILD_ARCH', d, True),
+ 'metadata_branch': bb.data.getVar('METADATA_BRANCH', d, True),
+ 'metadata_revision': bb.data.getVar('METADATA_REVISION', d, True),
'machine': bb.data.getVar('MACHINE', d, True),
'distro': bb.data.getVar('DISTRO', d, True),
})
@@ -140,6 +141,8 @@ def oestats_task(server, d, task, status):
'task': task,
'status': status,
'time': str(elapsed),
+ 'bug_number': bb.data.getVar('OESTATS_BUG_NUMBER', d, True) or "",
+ 'bug_tracker': bb.data.getVar('OESTATS_BUG_TRACKER', d, True) or "",
}, files)
except:
bb.note("oestats: error sending task, disabling stats")
diff --git a/classes/seppuku.bbclass b/classes/seppuku.bbclass
index 1bdee28fa1..ab8096eb45 100644
--- a/classes/seppuku.bbclass
+++ b/classes/seppuku.bbclass
@@ -380,5 +380,10 @@ python seppuku_eventhandler() {
else:
print >> debug_file, "Not trying to create an attachment for bug #%s" % bug_number
+ # store bug number for oestats-client
+ if bug_number:
+ bb.data.setVar('OESTATS_BUG_NUMBER', bug_number, event.data)
+ bb.data.setVar('OESTATS_BUG_TRACKER', "http://bugs.openembedded.net/", event.data)
+
return NotHandled
}