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 | |
parent | b83179c87e2e3965a635aa65dec9f95cc8c08430 (diff) | |
download | openembedded-core-0f516fe9a043276c670622895c4760ff6468f293.tar.gz openembedded-core-0f516fe9a043276c670622895c4760ff6468f293.tar.bz2 openembedded-core-0f516fe9a043276c670622895c4760ff6468f293.tar.xz openembedded-core-0f516fe9a043276c670622895c4760ff6468f293.zip |
bitbake/build.py: Add support for pre and postfuncs for tasks
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
-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 1f4107fb6..5e1aaee80 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py @@ -282,7 +282,13 @@ def exec_task(task, d): data.update_data(localdata) data.expandKeys(localdata) event.fire(TaskStarted(task, localdata), localdata) + prefuncs = (data.getVarFlag(task, 'prefuncs', localdata) or "").split() + for func in prefuncs: + exec_func(func, localdata) exec_func(task, localdata) + postfuncs = (data.getVarFlag(task, 'postfuncs', localdata) or "").split() + for func in postfuncs: + exec_func(func, localdata) event.fire(TaskSucceeded(task, localdata), localdata) except FuncFailed as message: # Try to extract the optional logfile |