[OE-core] [PATCH 2/3] bbclass/sstate: add hook SSTATE_CHECK_FUNCTIONS for sstate checking
Hongxu Jia
hongxu.jia at windriver.com
Wed Aug 27 07:53:24 UTC 2014
Provide hook for sstate checking, the checking failure will
break the building immediately. Pass input parameters by
bb.data (d.getVar/d.setVar).
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>
---
meta/classes/sstate.bbclass | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 4eec6bd..466fdf4 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -36,6 +36,18 @@ SSTATEPREINSTFUNCS ?= ""
SSTATEPOSTINSTFUNCS ?= ""
EXTRA_STAGING_FIXMES ?= ""
+# Provide hook for sstate checking, the checking failure will
+# break the building immediately. Pass input parameters by
+# bb.data (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 ?= ""
+
# Specify dirs in which the shell function is executed and don't use ${B}
# as default dirs to avoid possible race about ${B} with other task.
sstate_create_package[dirs] = "${SSTATE_BUILDDIR}"
@@ -704,6 +716,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.9.1
More information about the Openembedded-core
mailing list