From patchwork Wed May 23 15:45:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [bitbake-devel,3/4] build.py: Add additional debug messages Date: Wed, 23 May 2012 15:45:11 -0000 From: Mark Hatle X-Patchwork-Id: 28479 Message-Id: <1337787916-591-3-git-send-email-mark.hatle@windriver.com> To: 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. Signed-off-by: Mark Hatle --- lib/bb/build.py | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/lib/bb/build.py b/lib/bb/build.py index 9f2c6a7..363aced 100644 --- a/lib/bb/build.py +++ b/lib/bb/build.py @@ -206,6 +206,8 @@ def exec_func_python(func, d, runfile, cwd=None): olddir = None os.chdir(cwd) + bb.debug(2, "Executing python function %s" % func) + try: comp = utils.better_compile(code, func, 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) finally: + bb.debug(2, "Python function %s finished" % func) + if cwd and olddir: try: os.chdir(olddir) @@ -255,12 +259,16 @@ def exec_func_shell(func, d, runfile, cwd=None): else: logfile = sys.stdout + bb.debug(2, "Executing shell function %s" % func) + try: bb.process.run(cmd, shell=False, stdin=NULL, log=logfile) except bb.process.CmdError: logfn = d.getVar('BB_LOGFILE', True) raise FuncFailed(func, logfn) + bb.debug(2, "Shell function %s finished" % func) + def _task_data(fn, task, d): localdata = data.createCopy(d) localdata.setVar('BB_FILENAME', fn)