From 27dd7f82c946e2cdaa1359835b4c5eacd8c18576 Mon Sep 17 00:00:00 2001 From: Jeff Polk Date: Fri, 3 Sep 2010 11:22:20 -0600 Subject: 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 --- meta/classes/sstate.bbclass | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'meta') diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index b4ee87598..6f43ee52f 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass @@ -57,6 +57,7 @@ def sstate_state_fromvars(d): outputs = (bb.data.expand(bb.data.getVarFlag("do_" + task, 'sstate-outputdirs', d) or "", d)).split() plaindirs = (bb.data.expand(bb.data.getVarFlag("do_" + task, 'sstate-plaindirs', d) or "", d)).split() lockfiles = (bb.data.expand(bb.data.getVarFlag("do_" + task, 'sstate-lockfile', d) or "", d)).split() + interceptfuncs = (bb.data.expand(bb.data.getVarFlag("do_" + task, 'sstate-interceptfuncs', d) or "", d)).split() if not name or len(inputs) != len(outputs): bb.fatal("sstate variables not setup correctly?!") @@ -65,6 +66,7 @@ def sstate_state_fromvars(d): sstate_add(ss, inputs[i], outputs[i], d) ss['lockfiles'] = lockfiles ss['plaindirs'] = plaindirs + ss['interceptfuncs'] = interceptfuncs return ss def sstate_add(ss, source, dest, d): @@ -276,6 +278,8 @@ python sstate_task_prefunc () { python sstate_task_postfunc () { shared_state = sstate_state_fromvars(d) sstate_install(shared_state, d) + for intercept in shared_state['interceptfuncs']: + bb.build.exec_func(intercept, d) sstate_package(shared_state, d) } -- cgit v1.2.3