sanity.bbclass: Run our checking at BuildStarted, not ConfigParsed
authorChris Larson <chris_larson@mentor.com>
Mon, 26 Jul 2010 15:57:57 +0000 (08:57 -0700)
committerChris Larson <chris_larson@mentor.com>
Mon, 26 Jul 2010 15:57:57 +0000 (08:57 -0700)
ConfigParsed is often utilized to do programmatic changes to the configuration
metadata.  If these other event handlers set any variables which
sanity.bbclass needs to check, there's a problem, since we can't ensure those
handlers run before this one.  So, we move the sanity checking to when the
build is about to start, this ensures that the configuration metadata is
entirely ready to go.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
classes/sanity.bbclass

index cff415a..1fd5fbb 100644 (file)
@@ -188,8 +188,8 @@ def check_sanity(e):
        if messages != "":
                raise_sanity_error(messages)
 
-addhandler check_sanity_eventhandler
 python check_sanity_eventhandler() {
-    if bb.event.getName(e) == "ConfigParsed":
+    if isinstance(e, bb.event.BuildStarted):
         check_sanity(e)
 }
+addhandler check_sanity_eventhandler