summaryrefslogtreecommitdiffstats
path: root/meta-yocto/classes/poky-sanity.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta-yocto/classes/poky-sanity.bbclass')
-rw-r--r--meta-yocto/classes/poky-sanity.bbclass24
1 files changed, 24 insertions, 0 deletions
diff --git a/meta-yocto/classes/poky-sanity.bbclass b/meta-yocto/classes/poky-sanity.bbclass
new file mode 100644
index 0000000000..fff08b3a8a
--- /dev/null
+++ b/meta-yocto/classes/poky-sanity.bbclass
@@ -0,0 +1,24 @@
1python poky_update_bblayersconf() {
2 current_version = int(d.getVar('LCONF_VERSION', True) or -1)
3 latest_version = int(d.getVar('LAYER_CONF_VERSION', True) or -1)
4
5 bblayers_fn = bblayers_conf_file(d)
6 lines = sanity_conf_read(bblayers_fn)
7
8 if current_version == 5 and latest_version == 6:
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
17 current_version += 1
18 sanity_conf_update(bblayers_fn, lines, 'LCONF_VERSION', current_version)
19 return
20
21 sys.exit()
22}
23
24BBLAYERS_CONF_UPDATE_FUNCS += "poky_update_bblayersconf"