summaryrefslogtreecommitdiffstats
path: root/meta/classes/sanity.bbclass
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2016-02-29 17:28:56 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-02 23:08:51 +0000
commit4eaef67a3892be84f1e06278c4ea82468049f283 (patch)
tree9734fb9dd110f11465766534d61f1d6e3db084c4 /meta/classes/sanity.bbclass
parent86759deb5cd6e6bf574f3ba9846c86c4440b0dfb (diff)
downloadpoky-4eaef67a3892be84f1e06278c4ea82468049f283.tar.gz
sanity: Do not mistake meta-yocto-bsp for meta-yocto
The code in oecore_update_bblayers() handling the transition from meta-yocto to meta-poky was not very resilient. It would, e.g., mistake meta-yocto-bsp for meta-yocto if the former occurred before the latter in BBLAYERS. The code also failed to update multiple existences of meta-yocto in the bblayers.conf file, e.g., if it was present in BBLAYERS_NON_REMOVABLE in addition to BBLAYERS (which it is by default). (From OE-Core rev: 8deb14898f351bd33950291ccde7c4458c6cf506) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sanity.bbclass')
-rw-r--r--meta/classes/sanity.bbclass18
1 files changed, 12 insertions, 6 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index cdb28995c6..4873e64a79 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -77,7 +77,7 @@ python oecore_update_bblayers() {
77 lconf_version = int(d.getVar('LAYER_CONF_VERSION', True)) 77 lconf_version = int(d.getVar('LAYER_CONF_VERSION', True))
78 78
79 failmsg = """Your version of bblayers.conf has the wrong LCONF_VERSION (has %s, expecting %s). 79 failmsg = """Your version of bblayers.conf has the wrong LCONF_VERSION (has %s, expecting %s).
80Please compare the your file against bblayers.conf.sample and merge any changes before continuing. 80Please compare your file against bblayers.conf.sample and merge any changes before continuing.
81"meld conf/bblayers.conf ${COREBASE}/meta*/conf/bblayers.conf.sample" 81"meld conf/bblayers.conf ${COREBASE}/meta*/conf/bblayers.conf.sample"
82 82
83is a good way to visualise the changes.""" % (current_lconf, lconf_version) 83is a good way to visualise the changes.""" % (current_lconf, lconf_version)
@@ -132,12 +132,18 @@ is a good way to visualise the changes.""" % (current_lconf, lconf_version)
132 # Handle rename of meta-yocto -> meta-poky 132 # Handle rename of meta-yocto -> meta-poky
133 # This marks the start of separate version numbers but code is needed in OE-Core 133 # This marks the start of separate version numbers but code is needed in OE-Core
134 # for the migration, one last time. 134 # for the migration, one last time.
135 layers = d.getVar('BBLAYERS', True) 135 layers = d.getVar('BBLAYERS', True).split()
136 layers = [ os.path.basename(path) for path in layers ]
136 if 'meta-yocto' in layers: 137 if 'meta-yocto' in layers:
137 index, meta_yocto_line = sanity_conf_find_line('.*meta-yocto.*\n', lines) 138 found = False
138 if meta_yocto_line: 139 while True:
139 lines[index] = meta_yocto_line.replace('meta-yocto', 'meta-poky') 140 index, meta_yocto_line = sanity_conf_find_line(r'.*meta-yocto[\'"\s\n]', lines)
140 else: 141 if meta_yocto_line:
142 lines[index] = meta_yocto_line.replace('meta-yocto', 'meta-poky')
143 found = True
144 else:
145 break
146 if not found:
141 raise NotImplementedError(failmsg) 147 raise NotImplementedError(failmsg)
142 index, meta_yocto_line = sanity_conf_find_line('LCONF_VERSION.*\n', lines) 148 index, meta_yocto_line = sanity_conf_find_line('LCONF_VERSION.*\n', lines)
143 if meta_yocto_line: 149 if meta_yocto_line: