1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 00:20:08 +00:00

meta: remove True option to getVar calls

getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.

Search made with the following regex: getVar ?\(( ?[^,()]*), True\)

(From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Joshua Lock
2016-12-14 21:13:04 +00:00
committed by Richard Purdie
parent d5e67725ac
commit c4e2c59088
261 changed files with 2305 additions and 2305 deletions
+27 -27
View File
@@ -55,22 +55,22 @@ def tinder_format_http_post(d,status,log):
# the variables we will need to send on this form post
variables = {
"tree" : d.getVar('TINDER_TREE', True),
"machine_name" : d.getVar('TINDER_MACHINE', True),
"tree" : d.getVar('TINDER_TREE'),
"machine_name" : d.getVar('TINDER_MACHINE'),
"os" : os.uname()[0],
"os_version" : os.uname()[2],
"compiler" : "gcc",
"clobber" : d.getVar('TINDER_CLOBBER', True) or "0",
"srcdate" : d.getVar('SRCDATE', True),
"PN" : d.getVar('PN', True),
"PV" : d.getVar('PV', True),
"PR" : d.getVar('PR', True),
"FILE" : d.getVar('FILE', True) or "N/A",
"TARGETARCH" : d.getVar('TARGET_ARCH', True),
"TARGETFPU" : d.getVar('TARGET_FPU', True) or "Unknown",
"TARGETOS" : d.getVar('TARGET_OS', True) or "Unknown",
"MACHINE" : d.getVar('MACHINE', True) or "Unknown",
"DISTRO" : d.getVar('DISTRO', True) or "Unknown",
"clobber" : d.getVar('TINDER_CLOBBER') or "0",
"srcdate" : d.getVar('SRCDATE'),
"PN" : d.getVar('PN'),
"PV" : d.getVar('PV'),
"PR" : d.getVar('PR'),
"FILE" : d.getVar('FILE') or "N/A",
"TARGETARCH" : d.getVar('TARGET_ARCH'),
"TARGETFPU" : d.getVar('TARGET_FPU') or "Unknown",
"TARGETOS" : d.getVar('TARGET_OS') or "Unknown",
"MACHINE" : d.getVar('MACHINE') or "Unknown",
"DISTRO" : d.getVar('DISTRO') or "Unknown",
"zecke-rocks" : "sure",
}
@@ -127,7 +127,7 @@ def tinder_build_start(d):
# now we will need to save the machine number
# we will override any previous numbers
f = open(d.getVar('TMPDIR', True)+"/tinder-machine.id", 'w')
f = open(d.getVar('TMPDIR')+"/tinder-machine.id", 'w')
f.write(report)
@@ -137,8 +137,8 @@ def tinder_send_http(d, status, _log):
"""
# get the body and type
server = d.getVar('TINDER_HOST', True)
url = d.getVar('TINDER_URL', True)
server = d.getVar('TINDER_HOST')
url = d.getVar('TINDER_URL')
selector = url + "/xml/build_status.pl"
@@ -278,7 +278,7 @@ def tinder_do_tinder_report(event):
try:
# truncate the tinder log file
f = open(event.data.getVar('TINDER_LOG', True), 'w')
f = open(event.data.getVar('TINDER_LOG'), 'w')
f.write("")
f.close()
except:
@@ -287,7 +287,7 @@ def tinder_do_tinder_report(event):
try:
# write a status to the file. This is needed for the -k option
# of BitBake
g = open(event.data.getVar('TMPDIR', True)+"/tinder-status", 'w')
g = open(event.data.getVar('TMPDIR')+"/tinder-status", 'w')
g.write("")
g.close()
except IOError:
@@ -296,10 +296,10 @@ def tinder_do_tinder_report(event):
# Append the Task-Log (compile,configure...) to the log file
# we will send to the server
if name == "TaskSucceeded" or name == "TaskFailed":
log_file = glob.glob("%s/log.%s.*" % (event.data.getVar('T', True), event.task))
log_file = glob.glob("%s/log.%s.*" % (event.data.getVar('T'), event.task))
if len(log_file) != 0:
to_file = event.data.getVar('TINDER_LOG', True)
to_file = event.data.getVar('TINDER_LOG')
log += "".join(open(log_file[0], 'r').readlines())
# set the right 'HEADER'/Summary for the TinderBox
@@ -310,16 +310,16 @@ def tinder_do_tinder_report(event):
elif name == "TaskFailed":
log += "<--- TINDERBOX Task %s failed (FAILURE)\n" % event.task
elif name == "PkgStarted":
log += "---> TINDERBOX Package %s started\n" % event.data.getVar('PF', True)
log += "---> TINDERBOX Package %s started\n" % event.data.getVar('PF')
elif name == "PkgSucceeded":
log += "<--- TINDERBOX Package %s done (SUCCESS)\n" % event.data.getVar('PF', True)
log += "<--- TINDERBOX Package %s done (SUCCESS)\n" % event.data.getVar('PF')
elif name == "PkgFailed":
if not event.data.getVar('TINDER_AUTOBUILD', True) == "0":
if not event.data.getVar('TINDER_AUTOBUILD') == "0":
build.exec_task('do_clean', event.data)
log += "<--- TINDERBOX Package %s failed (FAILURE)\n" % event.data.getVar('PF', True)
log += "<--- TINDERBOX Package %s failed (FAILURE)\n" % event.data.getVar('PF')
status = 200
# remember the failure for the -k case
h = open(event.data.getVar('TMPDIR', True)+"/tinder-status", 'w')
h = open(event.data.getVar('TMPDIR')+"/tinder-status", 'w')
h.write("200")
elif name == "BuildCompleted":
log += "Build Completed\n"
@@ -342,7 +342,7 @@ def tinder_do_tinder_report(event):
log += "Error:Was Runtime: %d\n" % event.isRuntime()
status = 200
# remember the failure for the -k case
h = open(event.data.getVar('TMPDIR', True)+"/tinder-status", 'w')
h = open(event.data.getVar('TMPDIR')+"/tinder-status", 'w')
h.write("200")
# now post the log
@@ -360,7 +360,7 @@ python tinderclient_eventhandler() {
if e.data is None or bb.event.getName(e) == "MsgNote":
return
do_tinder_report = e.data.getVar('TINDER_REPORT', True)
do_tinder_report = e.data.getVar('TINDER_REPORT')
if do_tinder_report and do_tinder_report == "1":
tinder_do_tinder_report(e)