*** bblayers.conf should be updated automatically
PATCH 1/1 *** bblayers.conf should be updated automatically
To keep things simple for this release, Paul proposed to put the bblayers.conf merging code in sanity.bbclass. Because we don't to be invasive we do the meta-yocto specific bblayers.conf update in a bbclass (poky-sanity) appending the code to the check_bblayers_conf function from sanity.bbclass. After upgrading bblayers.conf we tell the user to re-run. It would be better if we could re-read the configuration but that is something we can address in 1.4. Every layer should make its specific bblayers.conf updates by appending to the check_bblayers_conf bitbake function. This patch depends on the patch sent to the oecore mailing list (sanity.bbclass: bblayers.conf should be updated automatically).
Constantin Musca (1):
poky-sanity.bbclass: bblayers.conf should be updated automatically
meta-yocto/classes/poky-sanity.bbclass | 16 ++++++++++++++++ meta-yocto/conf/distro/poky.conf | 3 +++ 2 files changed, 19 insertions(+) create mode 100644 meta-yocto/classes/poky-sanity.bbclass
Signature · 1 line
1.7.9.5
PATCH 1/1 poky-sanity.bbclass: bblayers.conf should be updated automatically
From: Constantin Musca <[email protected]>
- we need a bbclass (poky-sanity) so that we can append to the check_bblayers_conf bitbake function from sanity.bbclass the bblayers.conf specific merging functionality
- add check_bblayers_conf_append bitbake function which does the meta-yocto specific updates (the bblayers.conf v5 -> v6 update)
- every layer should make its specific bblayers.conf updates
- we ask the user to re-run bitbake because we can't trigger reparsing without being invasive
[YOCTO #3082]
--- meta-yocto/classes/poky-sanity.bbclass | 16 ++++++++++++++++ meta-yocto/conf/distro/poky.conf | 3 +++ 2 files changed, 19 insertions(+) create mode 100644 meta-yocto/classes/poky-sanity.bbclass
meta-yocto/classes/poky-sanity.bbclass new file +16 -0
@@ -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)) +}
meta-yocto/conf/distro/poky.conf +3 -0
@@ -93,6 +93,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" ERROR_QA = "dev-so debug-deps dev-deps debug-files arch la2 pkgconfig la perms useless-rpaths rpaths staticdev ldflags"
Signature · 1 line
1.7.9.5