2015-02-05 12:05:54 +00:00
|
|
|
# Provide some extensions to sanity.bbclass to handle poky-specific conf file upgrades
|
|
|
|
|
2013-04-12 20:22:49 +00:00
|
|
|
python poky_update_bblayersconf() {
|
|
|
|
current_version = int(d.getVar('LCONF_VERSION', True) or -1)
|
|
|
|
latest_version = int(d.getVar('LAYER_CONF_VERSION', True) or -1)
|
|
|
|
|
|
|
|
bblayers_fn = bblayers_conf_file(d)
|
|
|
|
lines = sanity_conf_read(bblayers_fn)
|
|
|
|
|
2015-02-05 12:05:54 +00:00
|
|
|
if current_version == 5 and latest_version > 5:
|
|
|
|
# Handle split out of meta-yocto-bsp from meta-yocto
|
2013-04-12 20:22:49 +00:00
|
|
|
if '/meta-yocto-bsp' not in d.getVar('BBLAYERS', True):
|
|
|
|
index, meta_yocto_line = sanity_conf_find_line('meta-yocto\s*\\\\\\n', lines)
|
2012-09-27 12:44:11 +00:00
|
|
|
if meta_yocto_line:
|
|
|
|
lines.insert(index + 1, meta_yocto_line.replace('meta-yocto',
|
|
|
|
'meta-yocto-bsp'))
|
|
|
|
else:
|
|
|
|
sys.exit()
|
|
|
|
|
2013-04-12 20:22:49 +00:00
|
|
|
current_version += 1
|
|
|
|
sanity_conf_update(bblayers_fn, lines, 'LCONF_VERSION', current_version)
|
|
|
|
return
|
|
|
|
|
|
|
|
sys.exit()
|
2012-09-27 12:44:11 +00:00
|
|
|
}
|
2013-04-12 20:22:49 +00:00
|
|
|
|
2015-02-05 12:05:54 +00:00
|
|
|
# Prepend to ensure our function runs before the OE-Core one
|
|
|
|
BBLAYERS_CONF_UPDATE_FUNCS =+ "poky_update_bblayersconf"
|