[OE-core] [PATCH] sstate.bbclass: allow to disable sstate package creation
Martin Jansa
martin.jansa at gmail.com
Thu Dec 15 18:31:09 UTC 2011
* building core-image-minimal-mtdutils with and without sstate packages enabled:
with without
real 98m 95m
user 212m 208m
sys 26m 25m
* but this was tested on fast machine with TMPDIR on fast raid0 array
so the impact is not so bad on simple image, but stuff like qt4 takes
ages on our slow buildhost
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
meta/classes/sstate.bbclass | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 0f88a23..22ce653 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -13,6 +13,8 @@ SSTATE_PKG = "${SSTATE_DIR}/${SSTATE_PKGNAME}"
SSTATE_SCAN_FILES ?= "*.la *-config"
SSTATE_SCAN_CMD ?= 'find ${SSTATE_BUILDDIR} \( -name "${@"\" -o -name \"".join(d.getVar("SSTATE_SCAN_FILES", True).split())}" \) -type f'
+SSTATE_CREATE_PKG ?= "1"
+
BB_HASHFILENAME = "${SSTATE_PKGNAME}"
SSTATE_MANMACH ?= "${SSTATE_PKGARCH}"
@@ -436,9 +438,11 @@ 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)
+ enabled = d.getVar('SSTATE_CREATE_PKG', True)
+ if enabled and enabled == "1":
+ for intercept in shared_state['interceptfuncs']:
+ bb.build.exec_func(intercept, d)
+ sstate_package(shared_state, d)
}
--
1.7.8
More information about the Openembedded-core
mailing list