Skip to contentSkip to conversation

populate_sdk_ext: use CUSTOM_TEPLATECONF variable to enable custom templateconf.cfg

PATCH Chandana kalluri 1 participant 1 message Dec 3, 2020 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Ping

On 11/30/20, 2:07 PM, "[email protected] on behalf of Chandana kalluri via lists.openembedded.org" <[email protected] on behalf of [email protected]> wrote:

The current implementation will always pick an existing templateconf.cfg if present else it will use the one from OE. A user might not always want to pick an existing tempalteconf.cfg even if its present. Introduce CUSTOM_TEMPLATECONF variable to provide an option for the user to specify if he wants to use an existing custom templateconf.cfg or not

If CUSTOM_TEMPLATECONF=='1' then enable custom templateconf.cfg. By default CUSTOM_TEMPLATECONF is set to '0'

---
meta/classes/populate_sdk_ext.bbclass | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass index 6f35b61..d1f61d5 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -24,6 +24,7 @@ SDK_INCLUDE_NATIVESDK ?= "0"
SDK_INCLUDE_BUILDTOOLS ?= '1'

SDK_RECRDEP_TASKS ?= ""
+CUSTOM_TEMPLATECONF ?= "0"

SDK_LOCAL_CONF_WHITELIST ?= ""
SDK_LOCAL_CONF_BLACKLIST ?= "CONF_VERSION \
@@ -199,6 +200,9 @@ python copy_buildsystem () {
buildsystem = oe.copy_buildsystem.BuildSystem('extensible SDK', d) baseoutpath = d.getVar('SDK_OUTPUT') + '/' + d.getVar('SDKPATH')

+ #check if custome templateconf path is set
+ use_custom_templateconf = d.getVar('CUSTOM_TEMPLATECONF')
+
# Determine if we're building a derivative extensible SDK (from devtool build-sdk) derivative = (d.getVar('SDK_DERIVATIVE') or '') == '1'
if derivative:
@@ -390,7 +394,7 @@ python copy_buildsystem () {
shutil.copyfile(builddir + '/cache/bb_unihashes.dat', baseoutpath + '/cache/bb_unihashes.dat')

# Use templateconf.cfg file from builddir if exists
- if os.path.exists(builddir + '/conf/templateconf.cfg'):
+ if os.path.exists(builddir + '/conf/templateconf.cfg') and use_custom_templateconf == '1':
shutil.copyfile(builddir + '/conf/templateconf.cfg', baseoutpath + '/conf/templateconf.cfg')
else:
# Write a templateconf.cfg
--
2.7.4