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:35:32 +0000 |
commit | b22831fd63164c4db9c0b72934d7d734a6585251 (patch) | |
tree | edb6581a041190290855bf86714430515c9f235a /meta/classes/bugzilla.bbclass | |
parent | 07ded02ffd37b4fe60a6210dbf56490ea306f0b6 (diff) | |
download | openembedded-core-b22831fd63164c4db9c0b72934d7d734a6585251.tar.gz openembedded-core-b22831fd63164c4db9c0b72934d7d734a6585251.tar.bz2 openembedded-core-b22831fd63164c4db9c0b72934d7d734a6585251.zip |
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 *`
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() { return if name == "TaskFailed": - xmlrpc = bb.data.getVar("BUGZILLA_XMLRPC", data, True) - user = bb.data.getVar("BUGZILLA_USER", data, True) - passw = bb.data.getVar("BUGZILLA_PASS", data, True) - product = bb.data.getVar("BUGZILLA_PRODUCT", data, True) - compon = bb.data.getVar("BUGZILLA_COMPONENT", data, True) - version = bb.data.getVar("BUGZILLA_VERSION", data, True) - - proxy = bb.data.getVar('http_proxy', data, True ) + xmlrpc = data.getVar("BUGZILLA_XMLRPC", True) + user = data.getVar("BUGZILLA_USER", True) + passw = data.getVar("BUGZILLA_PASS", True) + product = data.getVar("BUGZILLA_PRODUCT", True) + compon = data.getVar("BUGZILLA_COMPONENT", True) + version = data.getVar("BUGZILLA_VERSION", True) + + proxy = data.getVar('http_proxy', True ) if (proxy): import urllib2 s, u, p, hostport = urllib2._parse_proxy(proxy) @@ -132,14 +132,14 @@ python bugzilla_eventhandler() { 'component': compon} # evil hack to figure out what is going on - debug_file = open(os.path.join(bb.data.getVar("TMPDIR", data, True),"..","bugzilla-log"),"a") + debug_file = open(os.path.join(data.getVar("TMPDIR", True),"..","bugzilla-log"),"a") file = None - bugname = "%(package)s-%(pv)s-autobuild" % { "package" : bb.data.getVar("PN", data, True), - "pv" : bb.data.getVar("PV", data, True), + bugname = "%(package)s-%(pv)s-autobuild" % { "package" : data.getVar("PN", True), + "pv" : data.getVar("PV", True), } - log_file = glob.glob("%s/log.%s.*" % (bb.data.getVar('T', event.data, True), event.task)) - 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 ) ) + log_file = glob.glob("%s/log.%s.*" % (event.data.getVar('T', True), event.task)) + 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 ) ) if len(log_file) != 0: print >> debug_file, "Adding log file %s" % log_file[0] file = open(log_file[0], 'r') @@ -167,7 +167,7 @@ python bugzilla_eventhandler() { if bug_number and log: print >> debug_file, "The bug is known as '%s'" % bug_number - desc = "Build log for machine %s" % (bb.data.getVar('MACHINE', data, True)) + desc = "Build log for machine %s" % (data.getVar('MACHINE', True)) if not bugzilla_create_attachment(debug_file, server, args.copy(), bug_number, text, log_file[0], log, desc): print >> debug_file, "Failed to attach the build log for bug #%s" % bug_number else: @@ -181,6 +181,6 @@ python bugzilla_eventhandler() { # store bug number for oestats-client if bug_number: - bb.data.setVar('OESTATS_BUG_NUMBER', bug_number, data) + data.setVar('OESTATS_BUG_NUMBER', bug_number) } |