summaryrefslogtreecommitdiffstats
path: root/meta-yocto
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-04-12 21:22:49 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-13 23:49:34 +0100
commit35ffb696c6305e79a61207ddc7f0452ca8331ccc (patch)
tree0c429b86fedaf18d6bc94a6f3f03c5b2d3b75dc2 /meta-yocto
parenta04c1367199faf2075d3662000c99e94c77439f3 (diff)
downloadpoky-35ffb696c6305e79a61207ddc7f0452ca8331ccc.tar.gz
classes/poky-sanity: fix handling of bblayers.conf updating
* Update for new structure in sanity.bbclass - use a separate function to update bblayers.conf and add it to the list to be executed * Additionally, don't add meta-yocto-bsp if it's already in BBLAYERS (this can occur when switching between DISTRO = "" or other distros which use a LAYER_CONF_VERSION = "5" and DISTRO = "poky" which has LAYER_CONF_VERSION = "6") (From meta-yocto rev: bdb75d78811a440b0009b473ab9ec277dbb21bbe) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-yocto')
-rw-r--r--meta-yocto/classes/poky-sanity.bbclass26
1 files changed, 17 insertions, 9 deletions
diff --git a/meta-yocto/classes/poky-sanity.bbclass b/meta-yocto/classes/poky-sanity.bbclass
index 1c7514fdca..fff08b3a8a 100644
--- a/meta-yocto/classes/poky-sanity.bbclass
+++ b/meta-yocto/classes/poky-sanity.bbclass
@@ -1,16 +1,24 @@
1python check_bblayers_conf_append() { 1python poky_update_bblayersconf() {
2 if current_lconf != lconf_version: 2 current_version = int(d.getVar('LCONF_VERSION', True) or -1)
3 if current_lconf == 5: 3 latest_version = int(d.getVar('LAYER_CONF_VERSION', True) or -1)
4 index, meta_yocto_line = find_line('meta-yocto\s*\\\\\\n', lines) 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)
5 if meta_yocto_line: 11 if meta_yocto_line:
6 lines.insert(index + 1, meta_yocto_line.replace('meta-yocto', 12 lines.insert(index + 1, meta_yocto_line.replace('meta-yocto',
7 'meta-yocto-bsp')) 13 'meta-yocto-bsp'))
8 else: 14 else:
9 sys.exit() 15 sys.exit()
10 16
11 index, line = find_line('LCONF_VERSION', lines) 17 current_version += 1
12 current_lconf += 1 18 sanity_conf_update(bblayers_fn, lines, 'LCONF_VERSION', current_version)
13 lines[index] = 'LCONF_VERSION = "%d"\n' % current_lconf 19 return
14 with open(bblayers_fn, "w") as f: 20
15 f.write(''.join(lines)) 21 sys.exit()
16} 22}
23
24BBLAYERS_CONF_UPDATE_FUNCS += "poky_update_bblayersconf"