summaryrefslogtreecommitdiffstats
path: root/meta-yocto/classes
diff options
context:
space:
mode:
authorConstantin Musca <constantinx.musca@intel.com>2012-09-27 15:44:11 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-10-02 16:48:33 +0100
commitcbddb898c2dc6fe78780dfc337f9d3aad9205bc7 (patch)
tree08e91c92a6541b927d01577230fe60cedd61db76 /meta-yocto/classes
parent7c2b1d5366b021d921a4ecf1ee3a67fc833af3a3 (diff)
downloadpoky-cbddb898c2dc6fe78780dfc337f9d3aad9205bc7.tar.gz
poky-sanity.bbclass: bblayers.conf should be updated automatically
- 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] (From meta-yocto rev: 636783633ac0cd5bf66f8b9c9b26cb31ad082451) Signed-off-by: Constantin Musca <constantinx.musca@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-yocto/classes')
-rw-r--r--meta-yocto/classes/poky-sanity.bbclass16
1 files changed, 16 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..1c7514fdca
--- /dev/null
+++ b/meta-yocto/classes/poky-sanity.bbclass
@@ -0,0 +1,16 @@
1python check_bblayers_conf_append() {
2 if current_lconf != lconf_version:
3 if current_lconf == 5:
4 index, meta_yocto_line = find_line('meta-yocto\s*\\\\\\n', lines)
5 if meta_yocto_line:
6 lines.insert(index + 1, meta_yocto_line.replace('meta-yocto',
7 'meta-yocto-bsp'))
8 else:
9 sys.exit()
10
11 index, line = find_line('LCONF_VERSION', lines)
12 current_lconf += 1
13 lines[index] = 'LCONF_VERSION = "%d"\n' % current_lconf
14 with open(bblayers_fn, "w") as f:
15 f.write(''.join(lines))
16}