When switching between kirkstone and master branch the following error is produced:
ERROR - Command "/[...]/layers/poky$ /tmp/tmpeyolf6qy/get_bb_env /[...]/build" failed
--- Error summary ---
Error: TEMPLATECONF value points to nonexistent directory 'meta-poky/conf'
This is caused because the .templateconf in master changed to
TEMPLATECONF=${TEMPLATECONF:-meta-poky/conf/templates/default}
To workaround it we can simply remove the conf/templateconf.cfg before calling
get_build_system, since kas does not make usage of the TEMPLATECONF feature.
Signed-off-by: Diego Sueiro <
diego....@arm.com>
---
kas/libcmds.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/kas/libcmds.py b/kas/libcmds.py
index 8104aa9..463b24f 100644
--- a/kas/libcmds.py
+++ b/kas/libcmds.py
@@ -248,6 +248,15 @@ class SetupEnviron(Command):
return 'setup_environ'
def execute(self, ctx):
+ """
+ Remove the conf/templateconf.cfg file to avoid errors during
+ oe-init-build-env call if the path from templateconf.cfg becomes
+ invalid.
+ """
+ filename = ctx.build_dir + '/conf/templateconf.cfg'
+ if os.path.exists(filename):
+ os.remove(filename)
+
ctx.environ.update(get_build_environ(ctx.config.get_build_system()))
--
2.35.1