summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-06 12:54:15 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-08 13:34:45 +0100
commita12d9164ead57569269ad6d3e21332e95f73c04f (patch)
tree3f63349b4016492dd827385968117483b7df8fc2
parentf88652d2843612b9844d61a595dd3f829452673e (diff)
downloadpoky-a12d9164ead57569269ad6d3e21332e95f73c04f.tar.gz
base: Add MultiConfigParsed handler to deal with unstable build signatures
This uses the newly added MultiConfigParsed event to handle problems where checksums in multiconfig build were not fuctioning as expected. The issue arises around SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS which contains entries like: * gcc-cross-${TARGET_ARCH}->virtual/${TARGET_PREFIX}libc-for-gcc * gcc-cross-${TARGET_ARCH}->linux-libc-headers These need to be expanded in the multiconfig data store but then placed into the shared main datastore used by the siggen code. The only other alternative would be a siggen instance for each multiconfig however that seemed even more complex and invasive. In real world usage, this issue would mean a qemux86 base config with other armv5 and armv7 configs (e.g. beaglebone and qemuarm) would try and build gcc-cross twice since dependencies normaly excluded (e.g. linux-libc-headers) would now be included. This breaks sstate reuse as well as breaking builds unless separate tmpdirs are used. This patch adds all the entries for each multiconfig. Whilst there may be duplicates, this shouldn't be an issue. (From OE-Core rev: 7267e7c000c76c44d09835d4cd2bc485b6a39a2a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/base.bbclass12
1 files changed, 11 insertions, 1 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 3762c8addc..27a28b8b8c 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -220,7 +220,7 @@ def buildcfg_neededvars(d):
220 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)) 220 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))
221 221
222addhandler base_eventhandler 222addhandler base_eventhandler
223base_eventhandler[eventmask] = "bb.event.ConfigParsed bb.event.BuildStarted bb.event.RecipePreFinalise bb.runqueue.sceneQueueComplete bb.event.RecipeParsed" 223base_eventhandler[eventmask] = "bb.event.ConfigParsed bb.event.MultiConfigParsed bb.event.BuildStarted bb.event.RecipePreFinalise bb.runqueue.sceneQueueComplete bb.event.RecipeParsed"
224python base_eventhandler() { 224python base_eventhandler() {
225 import bb.runqueue 225 import bb.runqueue
226 226
@@ -235,6 +235,16 @@ python base_eventhandler() {
235 setup_hosttools_dir(d.getVar('HOSTTOOLS_DIR'), 'HOSTTOOLS', d) 235 setup_hosttools_dir(d.getVar('HOSTTOOLS_DIR'), 'HOSTTOOLS', d)
236 setup_hosttools_dir(d.getVar('HOSTTOOLS_DIR'), 'HOSTTOOLS_NONFATAL', d, fatal=False) 236 setup_hosttools_dir(d.getVar('HOSTTOOLS_DIR'), 'HOSTTOOLS_NONFATAL', d, fatal=False)
237 237
238 if isinstance(e, bb.event.MultiConfigParsed):
239 # We need to expand SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS in each of the multiconfig data stores
240 # own contexts so the variables get expanded correctly for that arch, then inject back into
241 # the main data store.
242 deps = []
243 for config in e.mcdata:
244 deps.append(e.mcdata[config].getVar("SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS"))
245 deps = " ".join(deps)
246 e.mcdata[''].setVar("SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS", deps)
247
238 if isinstance(e, bb.event.BuildStarted): 248 if isinstance(e, bb.event.BuildStarted):
239 localdata = bb.data.createCopy(e.data) 249 localdata = bb.data.createCopy(e.data)
240 statuslines = [] 250 statuslines = []