diff options
author | Scott Garman <scott.a.garman@intel.com> | 2011-02-22 18:32:45 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-02-23 15:52:51 +0000 |
commit | fa6e7860821f9f5af15af0253ded2cc1fde61fdb (patch) | |
tree | c9e8fced9124dd40be71e3e4bd82d39c5056cbee | |
parent | 91c0b3a2e6d006224d8d2b661ca7528e9d036f1b (diff) | |
download | poky-fa6e7860821f9f5af15af0253ded2cc1fde61fdb.tar.gz |
sstate.bbclass: add SSTATEPOSTINSTFUNCS
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@intel.com>
-rw-r--r-- | meta/classes/sstate.bbclass | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index 4f1bc39e7a..6f836a60b6 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass | |||
@@ -16,6 +16,8 @@ BB_HASHFILENAME = "${SSTATE_PKGNAME}" | |||
16 | 16 | ||
17 | SSTATE_MANMACH ?= "${SSTATE_PKGARCH}" | 17 | SSTATE_MANMACH ?= "${SSTATE_PKGARCH}" |
18 | 18 | ||
19 | SSTATEPOSTINSTFUNCS ?= "" | ||
20 | |||
19 | python () { | 21 | python () { |
20 | if bb.data.inherits_class('native', d): | 22 | if bb.data.inherits_class('native', d): |
21 | bb.data.setVar('SSTATE_PKGARCH', bb.data.getVar('BUILD_ARCH', d), d) | 23 | bb.data.setVar('SSTATE_PKGARCH', bb.data.getVar('BUILD_ARCH', d), d) |
@@ -129,6 +131,9 @@ def sstate_install(ss, d): | |||
129 | f.write(di + "\n") | 131 | f.write(di + "\n") |
130 | f.close() | 132 | f.close() |
131 | 133 | ||
134 | for postinst in (bb.data.getVar('SSTATEPOSTINSTFUNCS', d, True) or '').split(): | ||
135 | bb.build.exec_func(postinst, d) | ||
136 | |||
132 | for lock in locks: | 137 | for lock in locks: |
133 | bb.utils.unlockfile(lock) | 138 | bb.utils.unlockfile(lock) |
134 | 139 | ||