summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb/build.py
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-04 11:30:39 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-04 11:43:12 +0100
commit0f516fe9a043276c670622895c4760ff6468f293 (patch)
tree6b215c00d38249eab27029d0bcfac1419fc1ba8c /bitbake/lib/bb/build.py
parentb83179c87e2e3965a635aa65dec9f95cc8c08430 (diff)
downloadopenembedded-core-0f516fe9a043276c670622895c4760ff6468f293.tar.gz
openembedded-core-0f516fe9a043276c670622895c4760ff6468f293.tar.bz2
openembedded-core-0f516fe9a043276c670622895c4760ff6468f293.zip
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.py6
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):
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