* [PATCH 0/1] Fix for sanity handling of meta-yocto -> meta-poky
@ 2016-02-29 16:28 Peter Kjellerstedt
2016-02-29 16:28 ` [PATCH 1/1] sanity: Do not mistake meta-yocto-bsp for meta-yocto Peter Kjellerstedt
0 siblings, 1 reply; 2+ messages in thread
From: Peter Kjellerstedt @ 2016-02-29 16:28 UTC (permalink / raw)
To: openembedded-core
The code in sanity.bbclass to handle the transition from meta-yocto to
meta-poky needs to be more resilient and not mistake meta-yocto-bsp
for meta-yocto. It also needs to handle all occurrences of meta-yocto.
Even with the suggested change here the code still relies on that all
layers in bblayers.conf are specified on separate lines...
//Peter
The following changes since commit 4006a7f2762ccd5dcbc6cdff49482d4387a73261:
sanity: Fix int verses string reference (2016-02-28 22:54:09 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib pkj/sanity-meta-poky
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=pkj/sanity-meta-poky
Peter Kjellerstedt (1):
sanity: Do not mistake meta-yocto-bsp for meta-yocto
meta/classes/sanity.bbclass | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
--
2.1.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1] sanity: Do not mistake meta-yocto-bsp for meta-yocto
2016-02-29 16:28 [PATCH 0/1] Fix for sanity handling of meta-yocto -> meta-poky Peter Kjellerstedt
@ 2016-02-29 16:28 ` Peter Kjellerstedt
0 siblings, 0 replies; 2+ messages in thread
From: Peter Kjellerstedt @ 2016-02-29 16:28 UTC (permalink / raw)
To: openembedded-core
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@axis.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 52581f6..62a3809 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:
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-29 16:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-29 16:28 [PATCH 0/1] Fix for sanity handling of meta-yocto -> meta-poky Peter Kjellerstedt
2016-02-29 16:28 ` [PATCH 1/1] sanity: Do not mistake meta-yocto-bsp for meta-yocto Peter Kjellerstedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox