diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-11-09 15:00:01 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-11-10 11:51:19 +0000 |
| commit | c8dee9b92dfd545852ecac8dc2adfc95ac02e957 (patch) | |
| tree | 5f1b86954646a0f3bb914407994388a6a4346769 /meta/classes/bugzilla.bbclass | |
| parent | 5d3860f4a8abb8e95442b04f8b84a333af362fcd (diff) | |
| download | poky-c8dee9b92dfd545852ecac8dc2adfc95ac02e957.tar.gz | |
Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:
sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`
(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/bugzilla.bbclass')
| -rw-r--r-- | meta/classes/bugzilla.bbclass | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/meta/classes/bugzilla.bbclass b/meta/classes/bugzilla.bbclass index 801bd66d2f..4028d261c8 100644 --- a/meta/classes/bugzilla.bbclass +++ b/meta/classes/bugzilla.bbclass | |||
| @@ -109,14 +109,14 @@ python bugzilla_eventhandler() { | |||
| 109 | return | 109 | return |
| 110 | 110 | ||
| 111 | if name == "TaskFailed": | 111 | if name == "TaskFailed": |
| 112 | xmlrpc = bb.data.getVar("BUGZILLA_XMLRPC", data, True) | 112 | xmlrpc = data.getVar("BUGZILLA_XMLRPC", True) |
| 113 | user = bb.data.getVar("BUGZILLA_USER", data, True) | 113 | user = data.getVar("BUGZILLA_USER", True) |
| 114 | passw = bb.data.getVar("BUGZILLA_PASS", data, True) | 114 | passw = data.getVar("BUGZILLA_PASS", True) |
| 115 | product = bb.data.getVar("BUGZILLA_PRODUCT", data, True) | 115 | product = data.getVar("BUGZILLA_PRODUCT", True) |
| 116 | compon = bb.data.getVar("BUGZILLA_COMPONENT", data, True) | 116 | compon = data.getVar("BUGZILLA_COMPONENT", True) |
| 117 | version = bb.data.getVar("BUGZILLA_VERSION", data, True) | 117 | version = data.getVar("BUGZILLA_VERSION", True) |
| 118 | 118 | ||
| 119 | proxy = bb.data.getVar('http_proxy', data, True ) | 119 | proxy = data.getVar('http_proxy', True ) |
| 120 | if (proxy): | 120 | if (proxy): |
| 121 | import urllib2 | 121 | import urllib2 |
| 122 | s, u, p, hostport = urllib2._parse_proxy(proxy) | 122 | s, u, p, hostport = urllib2._parse_proxy(proxy) |
| @@ -132,14 +132,14 @@ python bugzilla_eventhandler() { | |||
| 132 | 'component': compon} | 132 | 'component': compon} |
| 133 | 133 | ||
| 134 | # evil hack to figure out what is going on | 134 | # evil hack to figure out what is going on |
| 135 | debug_file = open(os.path.join(bb.data.getVar("TMPDIR", data, True),"..","bugzilla-log"),"a") | 135 | debug_file = open(os.path.join(data.getVar("TMPDIR", True),"..","bugzilla-log"),"a") |
| 136 | 136 | ||
| 137 | file = None | 137 | file = None |
| 138 | bugname = "%(package)s-%(pv)s-autobuild" % { "package" : bb.data.getVar("PN", data, True), | 138 | bugname = "%(package)s-%(pv)s-autobuild" % { "package" : data.getVar("PN", True), |
| 139 | "pv" : bb.data.getVar("PV", data, True), | 139 | "pv" : data.getVar("PV", True), |
| 140 | } | 140 | } |
| 141 | log_file = glob.glob("%s/log.%s.*" % (bb.data.getVar('T', event.data, True), event.task)) | 141 | log_file = glob.glob("%s/log.%s.*" % (event.data.getVar('T', True), event.task)) |
| 142 | text = "The %s step in %s failed at %s for machine %s" % (e.task, bb.data.getVar("PN", data, True), bb.data.getVar('DATETIME', data, True), bb.data.getVar( 'MACHINE', data, True ) ) | 142 | text = "The %s step in %s failed at %s for machine %s" % (e.task, data.getVar("PN", True), data.getVar('DATETIME', True), data.getVar( 'MACHINE', True ) ) |
| 143 | if len(log_file) != 0: | 143 | if len(log_file) != 0: |
| 144 | print >> debug_file, "Adding log file %s" % log_file[0] | 144 | print >> debug_file, "Adding log file %s" % log_file[0] |
| 145 | file = open(log_file[0], 'r') | 145 | file = open(log_file[0], 'r') |
| @@ -167,7 +167,7 @@ python bugzilla_eventhandler() { | |||
| 167 | 167 | ||
| 168 | if bug_number and log: | 168 | if bug_number and log: |
| 169 | print >> debug_file, "The bug is known as '%s'" % bug_number | 169 | print >> debug_file, "The bug is known as '%s'" % bug_number |
| 170 | desc = "Build log for machine %s" % (bb.data.getVar('MACHINE', data, True)) | 170 | desc = "Build log for machine %s" % (data.getVar('MACHINE', True)) |
| 171 | if not bugzilla_create_attachment(debug_file, server, args.copy(), bug_number, text, log_file[0], log, desc): | 171 | if not bugzilla_create_attachment(debug_file, server, args.copy(), bug_number, text, log_file[0], log, desc): |
| 172 | print >> debug_file, "Failed to attach the build log for bug #%s" % bug_number | 172 | print >> debug_file, "Failed to attach the build log for bug #%s" % bug_number |
| 173 | else: | 173 | else: |
| @@ -181,6 +181,6 @@ python bugzilla_eventhandler() { | |||
| 181 | 181 | ||
| 182 | # store bug number for oestats-client | 182 | # store bug number for oestats-client |
| 183 | if bug_number: | 183 | if bug_number: |
| 184 | bb.data.setVar('OESTATS_BUG_NUMBER', bug_number, data) | 184 | data.setVar('OESTATS_BUG_NUMBER', bug_number) |
| 185 | } | 185 | } |
| 186 | 186 | ||
