summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-04-20 16:49:37 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-04-21 00:29:29 +0100
commit8ceb769eab14066c9a5fc6a68284de9c1f5637fe (patch)
tree46deb2d4478038f43d7af0c1c3902755eac72de6 /meta/classes
parent08127d444e05d8d33ce39abdce677655bd4766ea (diff)
downloadpoky-8ceb769eab14066c9a5fc6a68284de9c1f5637fe.tar.gz
Remove obsolete scripts/classes
(From OE-Core rev: 25efcd45c83a81d78f73b5da852e575b108b3fb5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/poky-autobuild-notifier.bbclass62
1 files changed, 0 insertions, 62 deletions
diff --git a/meta/classes/poky-autobuild-notifier.bbclass b/meta/classes/poky-autobuild-notifier.bbclass
deleted file mode 100644
index 9ab3d064ed..0000000000
--- a/meta/classes/poky-autobuild-notifier.bbclass
+++ /dev/null
@@ -1,62 +0,0 @@
1#
2# Copyright Openedhand Ltd 2008
3# Author: Richard Purdie
4#
5
6# Designed for use with the Poky autobuilder only and provides custom hooks for
7# certain specific events.
8
9def do_autobuilder_failure_report(event):
10 from bb.event import getName
11 from bb import data, mkdirhier, build
12 import os, glob
13
14 if data.getVar('PN', event.data, True) != "clutter":
15 return
16
17 import smtplib
18 import email.Message
19
20 version = data.expand("${PN}: ${PV}-${PR}", event.data)
21
22 recipients = ["richard@o-hand.com"]
23 COMMASPACE = ', '
24
25 message = email.Message.Message()
26 message["To"] = COMMASPACE.join(recipients)
27 message["From"] = "Poky Autobuilder Failure <poky@o-hand.com>"
28 message["Subject"] = "Poky Autobuild Failure Report - " + version
29
30 mesg = "Poky Build Failure for:\n\n"
31
32 for var in ["DISTRO", "MACHINE", "PN", "PV", "PR"]:
33 mesg += var + ": " + data.getVar(var, event.data, True) + "\n"
34
35 mesg += "\nLog of the failure follows:\n\n"
36
37 log_file = glob.glob("%s/log.%s.*" % (data.getVar('T', event.data, True), event.task))
38 if len(log_file) != 0:
39 mesg += "".join(open(log_file[0], 'r').readlines())
40
41 message.set_payload(mesg)
42
43 mailServer = smtplib.SMTP("pug.o-hand.com")
44 mailServer.sendmail(message["From"], recipients, message.as_string())
45 mailServer.quit()
46
47# we want to be an event handler
48addhandler poky_autobuilder_notifier_eventhandler
49python poky_autobuilder_notifier_eventhandler() {
50 from bb import note, error, data
51 from bb.event import getName
52
53 if e.data is None:
54 return
55
56 name = getName(e)
57
58 if name == "TaskFailed":
59 do_autobuilder_failure_report(e)
60
61 return
62}