summaryrefslogtreecommitdiffstats
path: root/meta/classes/populate_sdk_ext.bbclass
diff options
context:
space:
mode:
authorAndrej Valek <andrej.valek@siemens.com>2020-03-06 16:32:33 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-03-07 10:04:43 +0000
commite524e49ef22fd69882d5d2d01cd84db790e9cb88 (patch)
tree321cb5001cb84eada4df6675715515bee61bc28a /meta/classes/populate_sdk_ext.bbclass
parente51b82b05678a2602afce0ad892d84125620cf73 (diff)
downloadopenembedded-core-contrib-e524e49ef22fd69882d5d2d01cd84db790e9cb88.tar.gz
populate_sdk_ext: enable custom templateconf.cfg
Do not always override templateconf.cfg content. Add option to use already existing file. Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/populate_sdk_ext.bbclass')
-rw-r--r--meta/classes/populate_sdk_ext.bbclass10
1 files changed, 7 insertions, 3 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index 57fd29b1bb..9f26cfc131 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -388,9 +388,13 @@ python copy_buildsystem () {
bb.utils.mkdirhier(os.path.join(baseoutpath, 'cache'))
shutil.copyfile(builddir + '/cache/bb_unihashes.dat', baseoutpath + '/cache/bb_unihashes.dat')
- # Write a templateconf.cfg
- with open(baseoutpath + '/conf/templateconf.cfg', 'w') as f:
- f.write('meta/conf\n')
+ # Use templateconf.cfg file from builddir if exists
+ if os.path.exists(builddir + '/conf/templateconf.cfg'):
+ shutil.copyfile(builddir + '/conf/templateconf.cfg', baseoutpath + '/conf/templateconf.cfg')
+ else:
+ # Write a templateconf.cfg
+ with open(baseoutpath + '/conf/templateconf.cfg', 'w') as f:
+ f.write('meta/conf\n')
# Ensure any variables set from the external environment (by way of
# BB_ENV_EXTRAWHITE) are set in the SDK's configuration