summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/base.bbclass20
1 files changed, 19 insertions, 1 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index e6d1599032..0d92948972 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -204,7 +204,7 @@ def buildcfg_neededvars(d):
204 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)) 204 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))
205 205
206addhandler base_eventhandler 206addhandler base_eventhandler
207base_eventhandler[eventmask] = "bb.event.ConfigParsed bb.event.BuildStarted bb.event.RecipePreFinalise bb.runqueue.sceneQueueComplete" 207base_eventhandler[eventmask] = "bb.event.ConfigParsed bb.event.BuildStarted bb.event.RecipePreFinalise bb.runqueue.sceneQueueComplete bb.event.RecipeParsed"
208python base_eventhandler() { 208python base_eventhandler() {
209 import bb.runqueue 209 import bb.runqueue
210 210
@@ -254,6 +254,24 @@ python base_eventhandler() {
254 bb.debug(1, "Executing SceneQueue Completion commands: %s" % "\n".join(cmds)) 254 bb.debug(1, "Executing SceneQueue Completion commands: %s" % "\n".join(cmds))
255 bb.build.exec_func("completion_function", e.data) 255 bb.build.exec_func("completion_function", e.data)
256 os.remove(completions) 256 os.remove(completions)
257
258 if isinstance(e, bb.event.RecipeParsed):
259 #
260 # If we have multiple providers of virtual/X and a PREFERRED_PROVIDER_virtual/X is set
261 # skip parsing for all the other providers which will mean they get uninstalled from the
262 # sysroot since they're now "unreachable". This makes switching virtual/kernel work in
263 # particular.
264 #
265 pn = d.getVar('PN', True)
266 source_mirror_fetch = d.getVar('SOURCE_MIRROR_FETCH', False)
267 if not source_mirror_fetch:
268 provs = (d.getVar("PROVIDES", True) or "").split()
269 multiwhitelist = (d.getVar("MULTI_PROVIDER_WHITELIST", True) or "").split()
270 for p in provs:
271 if p.startswith("virtual/") and p not in multiwhitelist:
272 profprov = d.getVar("PREFERRED_PROVIDER_" + p, True)
273 if profprov and pn != profprov:
274 raise bb.parse.SkipPackage("PREFERRED_PROVIDER_%s set to %s, not %s" % (p, profprov, pn))
257} 275}
258 276
259CONFIGURESTAMPFILE = "${WORKDIR}/configure.sstate" 277CONFIGURESTAMPFILE = "${WORKDIR}/configure.sstate"