summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-11-02 15:31:05 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-11-16 10:37:58 +0000
commita531ca46365e7e72e382e8326a4a779f8448723a (patch)
treef00af0ddf439d285b2731d51e119a01f6a3bde2d /meta/classes
parent8d1d9cfdb52317049ff4d894706b1c9a6492b81a (diff)
downloadpoky-a531ca46365e7e72e382e8326a4a779f8448723a.tar.gz
classes/populate_sdk_ext: prevent invalid TEMPLATECONF entering eSDK
If you are using a repository which contains a .templateconf file that sets TEMPLATECONF to point into a layer it contains, but you aren't using that layer in your bblayers.conf, the eSDK would produce an error during the preparation step of the installation. An example would be using the poky repository but setting DISTRO to your own custom distro and removing meta-poky from your bblayers.conf. The eSDK doesn't support creating new build directories, so we don't care about the templates and can thus force a known good value to prevent this from happening. Fixes [YOCTO #10568]. (From OE-Core rev: 5ee32191a18013061dfa72e64713a94c5d321496) (From OE-Core rev: 7fbc086f47ef6e36c819836deaa1b2fb3f0ec97a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/populate_sdk_ext.bbclass6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index 0f0525d764..944fe5cd26 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -88,7 +88,7 @@ SDK_TITLE_task-populate-sdk-ext = "${@d.getVar('DISTRO_NAME', True) or d.getVar(
88def clean_esdk_builddir(d, sdkbasepath): 88def clean_esdk_builddir(d, sdkbasepath):
89 """Clean up traces of the fake build for create_filtered_tasklist()""" 89 """Clean up traces of the fake build for create_filtered_tasklist()"""
90 import shutil 90 import shutil
91 cleanpaths = 'cache conf/sanity_info conf/templateconf.cfg tmp'.split() 91 cleanpaths = 'cache conf/sanity_info tmp'.split()
92 for pth in cleanpaths: 92 for pth in cleanpaths:
93 fullpth = os.path.join(sdkbasepath, pth) 93 fullpth = os.path.join(sdkbasepath, pth)
94 if os.path.isdir(fullpth): 94 if os.path.isdir(fullpth):
@@ -344,6 +344,10 @@ python copy_buildsystem () {
344 if line.strip() and not line.startswith('#'): 344 if line.strip() and not line.startswith('#'):
345 f.write(line) 345 f.write(line)
346 346
347 # Write a templateconf.cfg
348 with open(baseoutpath + '/conf/templateconf.cfg', 'w') as f:
349 f.write('meta/conf\n')
350
347 # Ensure any variables set from the external environment (by way of 351 # Ensure any variables set from the external environment (by way of
348 # BB_ENV_EXTRAWHITE) are set in the SDK's configuration 352 # BB_ENV_EXTRAWHITE) are set in the SDK's configuration
349 extralines = [] 353 extralines = []