diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-04 11:30:39 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-04 11:43:12 +0100 |
commit | 0f516fe9a043276c670622895c4760ff6468f293 (patch) | |
tree | 6b215c00d38249eab27029d0bcfac1419fc1ba8c /bitbake/lib/bb/build.py | |
parent | b83179c87e2e3965a635aa65dec9f95cc8c08430 (diff) | |
download | poky-0f516fe9a043276c670622895c4760ff6468f293.tar.gz |
bitbake/build.py: Add support for pre and postfuncs for tasks
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/build.py')
-rw-r--r-- | bitbake/lib/bb/build.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 1f4107fb65..5e1aaee802 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py | |||
@@ -282,7 +282,13 @@ def exec_task(task, d): | |||
282 | data.update_data(localdata) | 282 | data.update_data(localdata) |
283 | data.expandKeys(localdata) | 283 | data.expandKeys(localdata) |
284 | event.fire(TaskStarted(task, localdata), localdata) | 284 | event.fire(TaskStarted(task, localdata), localdata) |
285 | prefuncs = (data.getVarFlag(task, 'prefuncs', localdata) or "").split() | ||
286 | for func in prefuncs: | ||
287 | exec_func(func, localdata) | ||
285 | exec_func(task, localdata) | 288 | exec_func(task, localdata) |
289 | postfuncs = (data.getVarFlag(task, 'postfuncs', localdata) or "").split() | ||
290 | for func in postfuncs: | ||
291 | exec_func(func, localdata) | ||
286 | event.fire(TaskSucceeded(task, localdata), localdata) | 292 | event.fire(TaskSucceeded(task, localdata), localdata) |
287 | except FuncFailed as message: | 293 | except FuncFailed as message: |
288 | # Try to extract the optional logfile | 294 | # Try to extract the optional logfile |