mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 13:09:50 +00:00
bitbake-runtask: Ensure logging options are inherited from the parent
[BUGID #291] Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
@@ -16,11 +16,13 @@ class BBConfiguration(object):
|
|||||||
Manages build options and configurations for one run
|
Manages build options and configurations for one run
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self, debug, debug_domains):
|
||||||
setattr(self, "data", {})
|
setattr(self, "data", {})
|
||||||
setattr(self, "file", [])
|
setattr(self, "file", [])
|
||||||
setattr(self, "cmd", None)
|
setattr(self, "cmd", None)
|
||||||
setattr(self, "dump_signatures", True)
|
setattr(self, "dump_signatures", True)
|
||||||
|
setattr(self, "debug", debug)
|
||||||
|
setattr(self, "debug_domains", debug_domains)
|
||||||
|
|
||||||
_warnings_showwarning = warnings.showwarning
|
_warnings_showwarning = warnings.showwarning
|
||||||
def _showwarning(message, category, filename, lineno, file=None, line=None):
|
def _showwarning(message, category, filename, lineno, file=None, line=None):
|
||||||
@@ -66,13 +68,19 @@ os.setpgrp()
|
|||||||
bb.event.worker_pid = os.getpid()
|
bb.event.worker_pid = os.getpid()
|
||||||
bb.event.useStdout = False
|
bb.event.useStdout = False
|
||||||
|
|
||||||
import bb.cooker
|
|
||||||
|
|
||||||
cooker = bb.cooker.BBCooker(BBConfiguration(), None)
|
|
||||||
hashfile = sys.argv[1]
|
hashfile = sys.argv[1]
|
||||||
buildfile = sys.argv[2]
|
buildfile = sys.argv[2]
|
||||||
taskname = sys.argv[3]
|
taskname = sys.argv[3]
|
||||||
|
|
||||||
|
import bb.cooker
|
||||||
|
|
||||||
|
p = pickle.Unpickler(file(hashfile, "rb"))
|
||||||
|
hashdata = p.load()
|
||||||
|
|
||||||
|
debug = hashdata["msg-debug"]
|
||||||
|
debug_domains = hashdata["msg-debug-domains"]
|
||||||
|
cooker = bb.cooker.BBCooker(BBConfiguration(debug, debug_domains), None)
|
||||||
|
|
||||||
cooker.parseConfiguration()
|
cooker.parseConfiguration()
|
||||||
|
|
||||||
cooker.bb_cache = bb.cache.init(cooker)
|
cooker.bb_cache = bb.cache.init(cooker)
|
||||||
@@ -92,9 +100,6 @@ cooker.bb_cache.handle_data(fn, cooker.status)
|
|||||||
if taskname.endswith("_setscene"):
|
if taskname.endswith("_setscene"):
|
||||||
the_data.setVarFlag(taskname, "quieterrors", "1")
|
the_data.setVarFlag(taskname, "quieterrors", "1")
|
||||||
|
|
||||||
p = pickle.Unpickler(file(hashfile, "rb"))
|
|
||||||
hashdata = p.load()
|
|
||||||
|
|
||||||
bb.parse.siggen.set_taskdata(hashdata["hashes"], hashdata["deps"])
|
bb.parse.siggen.set_taskdata(hashdata["hashes"], hashdata["deps"])
|
||||||
|
|
||||||
for h in hashdata["hashes"]:
|
for h in hashdata["hashes"]:
|
||||||
|
|||||||
@@ -719,6 +719,9 @@ class RunQueueData:
|
|||||||
deps.append(self.taskData.fn_index[self.runq_fnid[dep]] + "." + self.runq_task[dep])
|
deps.append(self.taskData.fn_index[self.runq_fnid[dep]] + "." + self.runq_task[dep])
|
||||||
hashdata["deps"][self.taskData.fn_index[self.runq_fnid[task]] + "." + self.runq_task[task]] = deps
|
hashdata["deps"][self.taskData.fn_index[self.runq_fnid[task]] + "." + self.runq_task[task]] = deps
|
||||||
|
|
||||||
|
hashdata["msg-debug"] = self.cooker.configuration.debug
|
||||||
|
hashdata["msg-debug-domains"] = self.cooker.configuration.debug_domains
|
||||||
|
|
||||||
# Write out the hashes into a file for use by the individual tasks
|
# Write out the hashes into a file for use by the individual tasks
|
||||||
self.hashfile = bb.data.expand("${TMPDIR}/cache/hashdata.dat", self.cooker.configuration.data)
|
self.hashfile = bb.data.expand("${TMPDIR}/cache/hashdata.dat", self.cooker.configuration.data)
|
||||||
p = pickle.Pickler(file(self.hashfile, "wb"), -1)
|
p = pickle.Pickler(file(self.hashfile, "wb"), -1)
|
||||||
|
|||||||
Reference in New Issue
Block a user