bin/bitbake:
authorHolger Hans Peter Freyther <zecke@selfish.org>
Mon, 17 Apr 2006 20:08:00 +0000 (20:08 +0000)
committerHolger Hans Peter Freyther <zecke@selfish.org>
Mon, 17 Apr 2006 20:08:00 +0000 (20:08 +0000)
    Add hack to register even handlers seen by the configuration
    file. We assume that we included at least one .inc file so
    INHERITS += got used.
    We should add a HANDLERS variable which will be responsible
    for installing the handlers

bin/bitbake

index 24405d0..2b11507 100755 (executable)
@@ -778,6 +778,13 @@ class BBCooker:
     def parseConfigurationFile( self, afile ):
         try:
             self.configuration.data = bb.parse.handle( afile, self.configuration.data )
+
+            # Add the handlers we inherited by INHERITS
+            # FIXME: This assumes that we included at least one .inc file
+            for var in bb.data.keys(self.configuration.data):
+                if bb.data.getVarFlag(var, 'handler', self.configuration.data):
+                    bb.event.register(var,bb.data.getVar(var,self.configuration.data))
+
         except IOError:
             bb.fatal( "Unable to open %s" % afile )
         except bb.parse.ParseError, details: