]> code.ossystems Code Review - openembedded-core.git/commitdiff
sstate.bbclass: Add support for sstate preinst functions
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 26 Jan 2012 14:40:56 +0000 (14:40 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 27 Jan 2012 09:38:23 +0000 (09:38 +0000)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/sstate.bbclass

index 0f88a23ec9adbb73e7c8b56fa323486d1d6cdbb0..4bd3712e57dc406f57667d3798db68097fe7f86f 100644 (file)
@@ -17,6 +17,7 @@ BB_HASHFILENAME = "${SSTATE_PKGNAME}"
 
 SSTATE_MANMACH ?= "${SSTATE_PKGARCH}"
 
+SSTATEPREINSTFUNCS ?= ""
 SSTATEPOSTINSTFUNCS ?= ""
 
 python () {
@@ -170,6 +171,10 @@ def sstate_installpkg(ss, d):
 
     d.setVar('SSTATE_INSTDIR', sstateinst)
     d.setVar('SSTATE_PKG', sstatepkg)
+
+    for preinst in (d.getVar('SSTATEPREINSTFUNCS', True) or '').split():
+        bb.build.exec_func(preinst, d)
+
     bb.build.exec_func('sstate_unpack_package', d)
 
     # Fixup hardcoded paths