sstate.bbclass: Add support for sstate preinst functions

(From OE-Core rev: f2b0a71b3100a0d2ceb80300d7f3823a31eb907a)

(From OE-Core rev: 8ca7387ff2dd788221a16021ec98b4aee946a187)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2012-01-26 14:40:56 +00:00
parent de485f4973
commit 36e13dd42f
1 changed files with 5 additions and 0 deletions

View 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):
bb.data.setVar('SSTATE_INSTDIR', sstateinst, d)
bb.data.setVar('SSTATE_PKG', sstatepkg, d)
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