poky-sanity.bbclass 1.1 KB

12345678910111213141516171819202122232425262728
  1. # Provide some extensions to sanity.bbclass to handle poky-specific conf file upgrades
  2. python poky_update_bblayersconf() {
  3. current_version = int(d.getVar('LCONF_VERSION', True) or -1)
  4. latest_version = int(d.getVar('LAYER_CONF_VERSION', True) or -1)
  5. bblayers_fn = bblayers_conf_file(d)
  6. lines = sanity_conf_read(bblayers_fn)
  7. if current_version == 5 and latest_version > 5:
  8. # Handle split out of meta-yocto-bsp from meta-yocto
  9. if '/meta-yocto-bsp' not in d.getVar('BBLAYERS', True):
  10. index, meta_yocto_line = sanity_conf_find_line('meta-yocto\s*\\\\\\n', lines)
  11. if meta_yocto_line:
  12. lines.insert(index + 1, meta_yocto_line.replace('meta-yocto',
  13. 'meta-yocto-bsp'))
  14. else:
  15. sys.exit()
  16. current_version += 1
  17. sanity_conf_update(bblayers_fn, lines, 'LCONF_VERSION', current_version)
  18. return
  19. sys.exit()
  20. }
  21. # Prepend to ensure our function runs before the OE-Core one
  22. BBLAYERS_CONF_UPDATE_FUNCS =+ "poky_update_bblayersconf"