[OE-core] [PATCH 09/27] bbclass/sstate: add hook SSTATE_CHECK_FUNCTIONS for sstate checking
Ross Burton
ross.burton at intel.com
Mon Sep 8 11:58:27 UTC 2014
From: Hongxu Jia <hongxu.jia at windriver.com>
Provide hook for sstate checking, the checking failure will
break the building immediately. Pass input parameters by
bb.data (d.setVar/d.getVar).
Hook : SSTATE_CHECK_FUNCTIONS
Input : missed - list of missing sstate file index in sq
: found - list of existing sstate file index in sq
: sq_fn - list of filenames in the sq
: sq_task - list of task names in the sq
: sq_hash - list of task hash in the sq
: sq_hashfn - list of hashfn in the sq
[YOCTO #6639]
Signed-off-by: Hongxu Jia <hongxu.jia at windriver.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
meta/classes/sstate.bbclass | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 67e0c1d..5a2e0c6 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -624,6 +624,18 @@ sstate_unpack_package () {
BB_HASHCHECK_FUNCTION = "sstate_checkhashes"
+# Provide hook for sstate checking, the checking failure will
+# break the building immediately. Pass input parameters by
+# bb.data (d.setVar/d.getVar).
+# Input : missed - list of missing sstate file index in sq
+# : found - list of existing sstate file index in sq
+# : sq_fn - list of filenames in the sq
+# : sq_task - list of task names in the sq
+# : sq_hash - list of task hash in the sq
+# : sq_hashfn - list of hashfn in the sq
+#
+SSTATE_CHECK_FUNCTIONS ?= ""
+
def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d):
ret = []
@@ -712,6 +724,20 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d):
evdata['found'].append( (sq_fn[task], sq_task[task], sq_hash[task], sstatefile ) )
bb.event.fire(bb.event.MetadataEvent("MissedSstate", evdata), d)
+ localdata = bb.data.createCopy(d)
+ bb.data.update_data(localdata)
+ for f in (localdata.getVar('SSTATE_CHECK_FUNCTIONS', True) or '').split():
+ localdata = bb.data.createCopy(d)
+ bb.data.update_data(localdata)
+ localdata.setVar('missed', missed)
+ localdata.setVar('found', ret)
+ localdata.setVar('sq_fn', sq_fn)
+ localdata.setVar('sq_task', sq_task)
+ localdata.setVar('sq_hash', sq_hash)
+ localdata.setVar('sq_hashfn', sq_hashfn)
+
+ bb.build.exec_func(f, localdata)
+
return ret
BB_SETSCENE_DEPVALID = "setscene_depvalid"
--
1.7.10.4
More information about the Openembedded-core
mailing list