From 197bd064d5e8e08e8d3112a7765d5147da1b3e3a Mon Sep 17 00:00:00 2001 From: Jeremy Laine Date: Fri, 23 May 2008 08:50:10 +0000 Subject: seppuku.bbclass,oestats-client.bbclass: add bug number and tracker to oestats --- classes/oestats-client.bbclass | 9 ++++++--- classes/seppuku.bbclass | 5 +++++ 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 } -- cgit v1.2.3