aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/base.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-28 17:51:42 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-31 10:31:03 +0100
commitb411085fefc8582d24c172db5f6610705eb44c2f (patch)
tree6f9841d1b2e22e21128a59df4357999997c2dd4a /meta/classes/base.bbclass
parentf9de9521477a1de8f6a399bcdc8260e28e34dfb3 (diff)
downloadopenembedded-core-contrib-b411085fefc8582d24c172db5f6610705eb44c2f.tar.gz
pixbufcache: Use sceneQueueComplete event to simplify usage
Ensuring the native pixbuf cache is correct after new loaders have been installed is tricky. This needs to be done without races and work regardless of whether the build is from sstate or freshly built for one or more modules. This adds a hook into base.bbclass which is then triggered by the code from pixbufcache. This patch is an improved version which means base.bbclass has no pixbuf knowledge and the mechanism can be reused in other cases. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r--meta/classes/base.bbclass15
1 files changed, 14 insertions, 1 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index e0f1053164..bfc78dba3a 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -204,8 +204,10 @@ def buildcfg_neededvars(d):
bb.fatal('The following variable(s) were not set: %s\nPlease set them directly, or choose a MACHINE or DISTRO that sets them.' % ', '.join(pesteruser))
addhandler base_eventhandler
-base_eventhandler[eventmask] = "bb.event.ConfigParsed bb.event.BuildStarted bb.event.RecipePreFinalise"
+base_eventhandler[eventmask] = "bb.event.ConfigParsed bb.event.BuildStarted bb.event.RecipePreFinalise bb.runqueue.sceneQueueComplete"
python base_eventhandler() {
+ import bb.runqueue
+
if isinstance(e, bb.event.ConfigParsed):
if not e.data.getVar("NATIVELSBSTRING", False):
e.data.setVar("NATIVELSBSTRING", lsb_distro_identifier(e.data))
@@ -241,6 +243,17 @@ python base_eventhandler() {
e.data.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++")
e.data.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs")
+ if isinstance(e, bb.runqueue.sceneQueueComplete):
+ completions = e.data.expand("${STAGING_DIR}/sstatecompletions")
+ if os.path.exists(completions):
+ cmds = set()
+ with open(completions, "r") as f:
+ cmds = set(f)
+ e.data.setVar("completion_function", "\n".join(cmds))
+ e.data.setVarFlag("completion_function", "func", "1")
+ bb.debug(1, "Executing SceneQueue Completion commands: %s" % "\n".join(cmds))
+ bb.build.exec_func("completion_function", e.data)
+ os.remove(completions)
}
CONFIGURESTAMPFILE = "${WORKDIR}/configure.sstate"