diff --git a/meta-yocto/classes/poky-sanity.bbclass b/meta-yocto/classes/poky-sanity.bbclass new file mode 100644 index 0000000000..1c7514fdca --- /dev/null +++ b/meta-yocto/classes/poky-sanity.bbclass @@ -0,0 +1,16 @@ +python check_bblayers_conf_append() { + if current_lconf != lconf_version: + if current_lconf == 5: + index, meta_yocto_line = 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() + + index, line = find_line('LCONF_VERSION', lines) + current_lconf += 1 + lines[index] = 'LCONF_VERSION = "%d"\n' % current_lconf + with open(bblayers_fn, "w") as f: + f.write(''.join(lines)) +} diff --git a/meta-yocto/conf/distro/poky.conf b/meta-yocto/conf/distro/poky.conf index f7b9e99c71..8489e56d8a 100644 --- a/meta-yocto/conf/distro/poky.conf +++ b/meta-yocto/conf/distro/poky.conf @@ -98,6 +98,9 @@ BB_SIGNATURE_HANDLER ?= 'OEBasicHash' # OELAYOUT_ABI = "8" +# add poky sanity bbclass +INHERIT += "poky-sanity" + #WARN_QA = "unsafe-references-in-binaries unsafe-references-in-scripts" WARN_QA = "" ERROR_QA = "dev-so debug-deps dev-deps debug-files arch la2 pkgconfig la perms useless-rpaths rpaths staticdev ldflags"