summaryrefslogtreecommitdiffstats
path: root/yocto-poky/meta-yocto/classes/poky-sanity.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'yocto-poky/meta-yocto/classes/poky-sanity.bbclass')
-rw-r--r--yocto-poky/meta-yocto/classes/poky-sanity.bbclass28
1 files changed, 28 insertions, 0 deletions
diff --git a/yocto-poky/meta-yocto/classes/poky-sanity.bbclass b/yocto-poky/meta-yocto/classes/poky-sanity.bbclass
new file mode 100644
index 000000000..77c266e94
--- /dev/null
+++ b/yocto-poky/meta-yocto/classes/poky-sanity.bbclass
@@ -0,0 +1,28 @@
+# Provide some extensions to sanity.bbclass to handle poky-specific conf file upgrades
+
+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)
+
+ if current_version == 5 and latest_version > 5:
+ # Handle split out of meta-yocto-bsp from meta-yocto
+ if '/meta-yocto-bsp' not in d.getVar('BBLAYERS', True):
+ index, meta_yocto_line = sanity_conf_find_line('meta-yocto\s*\\\\\\n', lines)
+ if meta_yocto_line:
+ lines.insert(index + 1, meta_yocto_line.replace('meta-yocto',
+ 'meta-yocto-bsp'))
+ else:
+ sys.exit()
+
+ current_version += 1
+ sanity_conf_update(bblayers_fn, lines, 'LCONF_VERSION', current_version)
+ return
+
+ sys.exit()
+}
+
+# Prepend to ensure our function runs before the OE-Core one
+BBLAYERS_CONF_UPDATE_FUNCS =+ "poky_update_bblayersconf"
OpenPOWER on IntegriCloud