Changes in BitBake 1.8.x:
- Fix exit code for build failures in --continue mode
- Fix git branch tags fetching
+ - Change parseConfigurationFile so it works on real data, not a copy
+ - Handle 'base' inherit and all other INHERITs from parseConfigurationFile
+ instead of BBHandler
Changes in BitBake 1.8.10:
- Psyco is available only for x86 - do not use it on other architectures.
try:
self.configuration.data = bb.parse.handle( afile, self.configuration.data )
- # Add the handlers we inherited by INHERIT
- # we need to do this manually as it is not guranteed
- # we will pick up these classes... as we only INHERIT
- # on .inc and .bb files but not on .conf
- data = bb.data.createCopy( self.configuration.data )
- inherits = ["base"] + (bb.data.getVar('INHERIT', data, True ) or "").split()
+ # Handle any INHERITs and inherit the base class
+ inherits = ["base"] + (bb.data.getVar('INHERIT', self.configuration.data, True ) or "").split()
for inherit in inherits:
- data = bb.parse.handle( os.path.join('classes', '%s.bbclass' % inherit ), data, True )
+ self.configuration.data = bb.parse.handle(os.path.join('classes', '%s.bbclass' % inherit), self.configuration.data, True )
- # FIXME: This assumes that we included at least one .inc file
- for var in bb.data.keys(data):
- if bb.data.getVarFlag(var, 'handler', data):
- bb.event.register(var,bb.data.getVar(var, data))
+ # Nomally we only register event handlers at the end of parsing .bb files
+ # We register any handlers we've found so far here...
+ for var in data.getVar('__BBHANDLERS', self.configuration.data) or []:
+ bb.event.register(var,bb.data.getVar(var, self.configuration.data))
bb.fetch.fetcher_init(self.configuration.data)
if ext == ".bbclass":
__classname__ = root
classes.append(__classname__)
+ __inherit_cache = data.getVar('__inherit_cache', d) or []
+ if not fn in __inherit_cache:
+ __inherit_cache.append(fn)
+ data.setVar('__inherit_cache', __inherit_cache, d)
if include != 0:
oldfile = data.getVar('FILE', d)
if ext != ".bbclass":
data.setVar('FILE', fn, d)
- i = (data.getVar("INHERIT", d, 1) or "").split()
- if not "base" in i and __classname__ != "base":
- i[0:0] = ["base"]
- inherit(i, d)
lineno = 0
while 1:
all_handlers = {}
for var in data.getVar('__BBHANDLERS', d) or []:
# try to add the handler
- # if we added it remember the choiche
handler = data.getVar(var,d)
- if bb.event.register(var,handler) == bb.event.Registered:
- all_handlers[var] = handler
+ bb.event.register(var, handler)
tasklist = {}
for var in data.getVar('__BBTASKS', d) or []:
bb.build.add_tasks(tasklist, d)
- # now add the handlers
- if not len(all_handlers) == 0:
- data.setVar('__all_handlers__', all_handlers, d)
-
bbpath.pop(0)
if oldfile:
bb.data.setVar("FILE", oldfile, d)