summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorJeff Polk <jeff.polk@windriver.com>2010-09-03 11:22:20 -0600
committerRichard Purdie <rpurdie@linux.intel.com>2010-09-10 12:55:34 +0100
commit27dd7f82c946e2cdaa1359835b4c5eacd8c18576 (patch)
treebb8e18a9914ea63ec65927ab15e001d807ff8a02 /meta/classes
parentd6e8013a8c1c439eef28301b1cc3b6f7674ee63b (diff)
downloadpoky-27dd7f82c946e2cdaa1359835b4c5eacd8c18576.tar.gz
sstate: Add sstate-interceptfuncs called between install and package
Adds the ability to impose intercept function call(s) after sstate_install and before sstate_package in sstate_task_postfunc. Signed-off-by: Jeff Polk <jeff.polk@windriver.com>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/sstate.bbclass4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index b4ee875988..6f43ee52f8 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -57,6 +57,7 @@ def sstate_state_fromvars(d):
57 outputs = (bb.data.expand(bb.data.getVarFlag("do_" + task, 'sstate-outputdirs', d) or "", d)).split() 57 outputs = (bb.data.expand(bb.data.getVarFlag("do_" + task, 'sstate-outputdirs', d) or "", d)).split()
58 plaindirs = (bb.data.expand(bb.data.getVarFlag("do_" + task, 'sstate-plaindirs', d) or "", d)).split() 58 plaindirs = (bb.data.expand(bb.data.getVarFlag("do_" + task, 'sstate-plaindirs', d) or "", d)).split()
59 lockfiles = (bb.data.expand(bb.data.getVarFlag("do_" + task, 'sstate-lockfile', d) or "", d)).split() 59 lockfiles = (bb.data.expand(bb.data.getVarFlag("do_" + task, 'sstate-lockfile', d) or "", d)).split()
60 interceptfuncs = (bb.data.expand(bb.data.getVarFlag("do_" + task, 'sstate-interceptfuncs', d) or "", d)).split()
60 if not name or len(inputs) != len(outputs): 61 if not name or len(inputs) != len(outputs):
61 bb.fatal("sstate variables not setup correctly?!") 62 bb.fatal("sstate variables not setup correctly?!")
62 63
@@ -65,6 +66,7 @@ def sstate_state_fromvars(d):
65 sstate_add(ss, inputs[i], outputs[i], d) 66 sstate_add(ss, inputs[i], outputs[i], d)
66 ss['lockfiles'] = lockfiles 67 ss['lockfiles'] = lockfiles
67 ss['plaindirs'] = plaindirs 68 ss['plaindirs'] = plaindirs
69 ss['interceptfuncs'] = interceptfuncs
68 return ss 70 return ss
69 71
70def sstate_add(ss, source, dest, d): 72def sstate_add(ss, source, dest, d):
@@ -276,6 +278,8 @@ python sstate_task_prefunc () {
276python sstate_task_postfunc () { 278python sstate_task_postfunc () {
277 shared_state = sstate_state_fromvars(d) 279 shared_state = sstate_state_fromvars(d)
278 sstate_install(shared_state, d) 280 sstate_install(shared_state, d)
281 for intercept in shared_state['interceptfuncs']:
282 bb.build.exec_func(intercept, d)
279 sstate_package(shared_state, d) 283 sstate_package(shared_state, d)
280} 284}
281 285