diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2012-05-23 10:45:11 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-23 18:15:23 +0100 |
commit | 63aaecb05724942fc254885f6a423974fc217521 (patch) | |
tree | 5f56c9d9981d0b2b595294bf7bc7db32c0a459df /bitbake | |
parent | d0de551d44e6d88a4d46bea4e9593a7201a1659e (diff) | |
download | poky-63aaecb05724942fc254885f6a423974fc217521.tar.gz |
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>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/build.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 9f2c6a7d23..363acedb4d 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py | |||
@@ -206,6 +206,8 @@ def exec_func_python(func, d, runfile, cwd=None): | |||
206 | olddir = None | 206 | olddir = None |
207 | os.chdir(cwd) | 207 | os.chdir(cwd) |
208 | 208 | ||
209 | bb.debug(2, "Executing python function %s" % func) | ||
210 | |||
209 | try: | 211 | try: |
210 | comp = utils.better_compile(code, func, bbfile) | 212 | comp = utils.better_compile(code, func, bbfile) |
211 | utils.better_exec(comp, {"d": d}, code, bbfile) | 213 | utils.better_exec(comp, {"d": d}, code, bbfile) |
@@ -215,6 +217,8 @@ def exec_func_python(func, d, runfile, cwd=None): | |||
215 | 217 | ||
216 | raise FuncFailed(func, None) | 218 | raise FuncFailed(func, None) |
217 | finally: | 219 | finally: |
220 | bb.debug(2, "Python function %s finished" % func) | ||
221 | |||
218 | if cwd and olddir: | 222 | if cwd and olddir: |
219 | try: | 223 | try: |
220 | os.chdir(olddir) | 224 | os.chdir(olddir) |
@@ -255,12 +259,16 @@ def exec_func_shell(func, d, runfile, cwd=None): | |||
255 | else: | 259 | else: |
256 | logfile = sys.stdout | 260 | logfile = sys.stdout |
257 | 261 | ||
262 | bb.debug(2, "Executing shell function %s" % func) | ||
263 | |||
258 | try: | 264 | try: |
259 | bb.process.run(cmd, shell=False, stdin=NULL, log=logfile) | 265 | bb.process.run(cmd, shell=False, stdin=NULL, log=logfile) |
260 | except bb.process.CmdError: | 266 | except bb.process.CmdError: |
261 | logfn = d.getVar('BB_LOGFILE', True) | 267 | logfn = d.getVar('BB_LOGFILE', True) |
262 | raise FuncFailed(func, logfn) | 268 | raise FuncFailed(func, logfn) |
263 | 269 | ||
270 | bb.debug(2, "Shell function %s finished" % func) | ||
271 | |||
264 | def _task_data(fn, task, d): | 272 | def _task_data(fn, task, d): |
265 | localdata = data.createCopy(d) | 273 | localdata = data.createCopy(d) |
266 | localdata.setVar('BB_FILENAME', fn) | 274 | localdata.setVar('BB_FILENAME', fn) |