mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
build.py: Add additional debug messages
We now add a debug message when entering and exiting a python or shell function. This makes it easier to inspect a log and figure out the run order from the logs. (Bitbake rev: a0f554d0e722b6705844c6031fdcafa5d1a1c8a7) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
d0de551d44
commit
63aaecb057
@@ -206,6 +206,8 @@ def exec_func_python(func, d, runfile, cwd=None):
|
|||||||
olddir = None
|
olddir = None
|
||||||
os.chdir(cwd)
|
os.chdir(cwd)
|
||||||
|
|
||||||
|
bb.debug(2, "Executing python function %s" % func)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
comp = utils.better_compile(code, func, bbfile)
|
comp = utils.better_compile(code, func, bbfile)
|
||||||
utils.better_exec(comp, {"d": d}, code, bbfile)
|
utils.better_exec(comp, {"d": d}, code, bbfile)
|
||||||
@@ -215,6 +217,8 @@ def exec_func_python(func, d, runfile, cwd=None):
|
|||||||
|
|
||||||
raise FuncFailed(func, None)
|
raise FuncFailed(func, None)
|
||||||
finally:
|
finally:
|
||||||
|
bb.debug(2, "Python function %s finished" % func)
|
||||||
|
|
||||||
if cwd and olddir:
|
if cwd and olddir:
|
||||||
try:
|
try:
|
||||||
os.chdir(olddir)
|
os.chdir(olddir)
|
||||||
@@ -255,12 +259,16 @@ def exec_func_shell(func, d, runfile, cwd=None):
|
|||||||
else:
|
else:
|
||||||
logfile = sys.stdout
|
logfile = sys.stdout
|
||||||
|
|
||||||
|
bb.debug(2, "Executing shell function %s" % func)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
bb.process.run(cmd, shell=False, stdin=NULL, log=logfile)
|
bb.process.run(cmd, shell=False, stdin=NULL, log=logfile)
|
||||||
except bb.process.CmdError:
|
except bb.process.CmdError:
|
||||||
logfn = d.getVar('BB_LOGFILE', True)
|
logfn = d.getVar('BB_LOGFILE', True)
|
||||||
raise FuncFailed(func, logfn)
|
raise FuncFailed(func, logfn)
|
||||||
|
|
||||||
|
bb.debug(2, "Shell function %s finished" % func)
|
||||||
|
|
||||||
def _task_data(fn, task, d):
|
def _task_data(fn, task, d):
|
||||||
localdata = data.createCopy(d)
|
localdata = data.createCopy(d)
|
||||||
localdata.setVar('BB_FILENAME', fn)
|
localdata.setVar('BB_FILENAME', fn)
|
||||||
|
|||||||
Reference in New Issue
Block a user