diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes-global/base.bbclass | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass index 8215969c7b..4ac3b83eb5 100644 --- a/meta/classes-global/base.bbclass +++ b/meta/classes-global/base.bbclass | |||
@@ -267,10 +267,19 @@ def buildcfg_neededvars(d): | |||
267 | 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)) | 267 | 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)) |
268 | 268 | ||
269 | addhandler base_eventhandler | 269 | addhandler base_eventhandler |
270 | base_eventhandler[eventmask] = "bb.event.ConfigParsed bb.event.MultiConfigParsed bb.event.BuildStarted bb.event.RecipePreFinalise bb.event.RecipeParsed" | 270 | base_eventhandler[eventmask] = "bb.event.ConfigParsed bb.event.MultiConfigParsed bb.event.BuildStarted bb.event.RecipePreFinalise bb.event.RecipeParsed bb.event.RecipePreDeferredInherits" |
271 | python base_eventhandler() { | 271 | python base_eventhandler() { |
272 | import bb.runqueue | 272 | import bb.runqueue |
273 | 273 | ||
274 | if isinstance(e, bb.event.RecipePreDeferredInherits): | ||
275 | # Use this to snoop on class extensions and set these up before the deferred inherits | ||
276 | # are processed which allows overrides on conditional variables. | ||
277 | for c in ['native', 'nativesdk', 'crosssdk', 'cross']: | ||
278 | if c in e.inherits: | ||
279 | d.setVar('CLASSOVERRIDE', 'class-' + c) | ||
280 | break | ||
281 | return | ||
282 | |||
274 | if isinstance(e, bb.event.ConfigParsed): | 283 | if isinstance(e, bb.event.ConfigParsed): |
275 | if not d.getVar("NATIVELSBSTRING", False): | 284 | if not d.getVar("NATIVELSBSTRING", False): |
276 | d.setVar("NATIVELSBSTRING", lsb_distro_identifier(d)) | 285 | d.setVar("NATIVELSBSTRING", lsb_distro_identifier(d)) |