* [PATCH 0/1] Fix handling of bblayers.conf updating (poky part)
@ 2013-04-12 20:22 Paul Eggleton
2013-04-12 20:22 ` [PATCH 1/1] classes/poky-sanity: fix handling of bblayers.conf updating Paul Eggleton
0 siblings, 1 reply; 2+ messages in thread
From: Paul Eggleton @ 2013-04-12 20:22 UTC (permalink / raw)
To: poky
Fixes endless looping and other bad behaviour in the code that updates
bblayers.conf on startup. This is an important fix for the 1.4 release.
This change depends upon the corresponding OE-Core change which has just
been sent.
The following changes since commit 2ef72c3174c8c111678ac7e3cf3d866eaf2c8d77:
wayland: add necessary dependencies to fix build error (2013-04-11 16:41:13 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib paule/bblayers-conf-fix-poky
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=paule/bblayers-conf-fix-poky
Paul Eggleton (1):
classes/poky-sanity: fix handling of bblayers.conf updating
meta-yocto/classes/poky-sanity.bbclass | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)
--
1.7.10.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1] classes/poky-sanity: fix handling of bblayers.conf updating
2013-04-12 20:22 [PATCH 0/1] Fix handling of bblayers.conf updating (poky part) Paul Eggleton
@ 2013-04-12 20:22 ` Paul Eggleton
0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggleton @ 2013-04-12 20:22 UTC (permalink / raw)
To: poky
* 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")
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
meta-yocto/classes/poky-sanity.bbclass | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)
diff --git a/meta-yocto/classes/poky-sanity.bbclass b/meta-yocto/classes/poky-sanity.bbclass
index 1c7514f..fff08b3 100644
--- a/meta-yocto/classes/poky-sanity.bbclass
+++ b/meta-yocto/classes/poky-sanity.bbclass
@@ -1,16 +1,24 @@
-python check_bblayers_conf_append() {
- if current_lconf != lconf_version:
- if current_lconf == 5:
- index, meta_yocto_line = find_line('meta-yocto\s*\\\\\\n', lines)
+python poky_update_bblayersconf() {
+ current_version = int(d.getVar('LCONF_VERSION', True) or -1)
+ latest_version = int(d.getVar('LAYER_CONF_VERSION', True) or -1)
+
+ bblayers_fn = bblayers_conf_file(d)
+ lines = sanity_conf_read(bblayers_fn)
+
+ if current_version == 5 and latest_version == 6:
+ if '/meta-yocto-bsp' not in d.getVar('BBLAYERS', True):
+ index, meta_yocto_line = sanity_conf_find_line('meta-yocto\s*\\\\\\n', lines)
if meta_yocto_line:
lines.insert(index + 1, meta_yocto_line.replace('meta-yocto',
'meta-yocto-bsp'))
else:
sys.exit()
- index, line = find_line('LCONF_VERSION', lines)
- current_lconf += 1
- lines[index] = 'LCONF_VERSION = "%d"\n' % current_lconf
- with open(bblayers_fn, "w") as f:
- f.write(''.join(lines))
+ current_version += 1
+ sanity_conf_update(bblayers_fn, lines, 'LCONF_VERSION', current_version)
+ return
+
+ sys.exit()
}
+
+BBLAYERS_CONF_UPDATE_FUNCS += "poky_update_bblayersconf"
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-04-12 20:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-12 20:22 [PATCH 0/1] Fix handling of bblayers.conf updating (poky part) Paul Eggleton
2013-04-12 20:22 ` [PATCH 1/1] classes/poky-sanity: fix handling of bblayers.conf updating Paul Eggleton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.