[poky] [PATCH 1/4] sstate.bbclass: add SSTATEPOSTINSTFUNCS
Scott Garman
scott.a.garman at intel.com
Tue Feb 22 22:22:59 PST 2011
From: Scott Garman <scott.a.garman at intel.com>
When doing builds using sstate cache, there was no way to run
the equivalent of a pkg_postinst function. This is needed by
the SGML-related documentation recipes to properly update the
catalog files when new DTDs and stylesheets are installed.
SSTATEPOSTINSTFUNCS is a new variable you can set to function(s)
in your recipe to run after install is completed from sstate.
Thanks to Richard Purdie for suggesting this solution.
Signed-off-by: Scott Garman <scott.a.garman at intel.com>
---
meta/classes/sstate.bbclass | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 4f1bc39..33e5829 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -16,6 +16,8 @@ BB_HASHFILENAME = "${SSTATE_PKGNAME}"
SSTATE_MANMACH ?= "${SSTATE_PKGARCH}"
+SSTATEPOSTINSTFUNCS ?= ""
+
python () {
if bb.data.inherits_class('native', d):
bb.data.setVar('SSTATE_PKGARCH', bb.data.getVar('BUILD_ARCH', d), d)
@@ -129,6 +131,12 @@ def sstate_install(ss, d):
f.write(di + "\n")
f.close()
+ # This is used for running post-install functions for sstate packages
+ # which need to generate dynamic data. Various SGML-related recipes
+ # need this to update the super catalog correctly.
+ for postinst in (bb.data.getVar('SSTATEPOSTINSTFUNCS', d, True) or '').split():
+ bb.build.exec_func(postinst, d)
+
for lock in locks:
bb.utils.unlockfile(lock)
--
1.7.1
More information about the poky
mailing list