Skip to contentSkip to conversation

sstate.bbclass: allow to disable sstate package creation

PATCH New Martin Jansa 1 participant 1 message Dec 15, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sstate.bbclass: allow to disable sstate package creation

* 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

---
 meta/classes/sstate.bbclass |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
meta/classes/sstate.bbclass +7 -3
index 0f88a23..22ce653 100644
@@ -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)
 }
   
 
Signature · 1 line
1.7.8