[oe-commits] [openembedded-core] 25/42: sanity: Do not mistake meta-yocto-bsp for meta-yocto

git at git.openembedded.org git at git.openembedded.org
Tue Mar 1 08:40:07 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit b5e33a494f967d9f131f5c9bdb0e34044f898e69
Author: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
AuthorDate: Mon Feb 29 17:28:56 2016 +0100

    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).
    
    Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/classes/sanity.bbclass | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index cdb2899..4873e64 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -77,7 +77,7 @@ python oecore_update_bblayers() {
     lconf_version = int(d.getVar('LAYER_CONF_VERSION', True))
 
     failmsg = """Your version of bblayers.conf has the wrong LCONF_VERSION (has %s, expecting %s).
-Please compare the your file against bblayers.conf.sample and merge any changes before continuing.
+Please compare your file against bblayers.conf.sample and merge any changes before continuing.
 "meld conf/bblayers.conf ${COREBASE}/meta*/conf/bblayers.conf.sample" 
 
 is 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)
         # Handle rename of meta-yocto -> meta-poky
         # This marks the start of separate version numbers but code is needed in OE-Core
         # for the migration, one last time.
-        layers = d.getVar('BBLAYERS', True)
+        layers = d.getVar('BBLAYERS', True).split()
+	layers = [ os.path.basename(path) for path in layers ]
         if 'meta-yocto' in layers:
-            index, meta_yocto_line = sanity_conf_find_line('.*meta-yocto.*\n', lines)
-            if meta_yocto_line:
-                lines[index] = meta_yocto_line.replace('meta-yocto', 'meta-poky')
-            else:
+            found = False
+            while True:
+                index, meta_yocto_line = sanity_conf_find_line(r'.*meta-yocto[\'"\s\n]', lines)
+                if meta_yocto_line:
+                    lines[index] = meta_yocto_line.replace('meta-yocto', 'meta-poky')
+                    found = True
+                else:
+                    break
+            if not found:
                 raise NotImplementedError(failmsg)
             index, meta_yocto_line = sanity_conf_find_line('LCONF_VERSION.*\n', lines)
             if meta_yocto_line:

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list