summaryrefslogtreecommitdiffstats
path: root/meta/classes/populate_sdk_ext.bbclass
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-02-19 22:41:58 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-21 09:32:43 +0000
commit4883ccce1b28a37cce82ca51510250d0223f1438 (patch)
tree39b394bc79953e3540adb136be38737217ec7645 /meta/classes/populate_sdk_ext.bbclass
parent524ee088b3ce354b4f29c0b18e92c532526f8909 (diff)
downloadpoky-4883ccce1b28a37cce82ca51510250d0223f1438.tar.gz
classes/populate_sdk_ext: add a better config extension mechanism
The sdk_extraconf() method of setting the configuration was awkward since you needed to set it in a class and then inherit that class since function definitions aren't allowed in conf files. It seemed to me the a neater way to do this was to read the extra lines from an additional conf file sdk-extra.conf (which can be located in a conf/ directory anywhere along BBPATH as with other configuration files). (From OE-Core rev: b53edb86c65ad375df153017f245244ef97f3932) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.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.bbclass8
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index 1c1bb47687..a6badb84c6 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -188,7 +188,15 @@ python copy_buildsystem () {
188 # Hide the config information from bitbake output (since it's fixed within the SDK) 188 # Hide the config information from bitbake output (since it's fixed within the SDK)
189 f.write('BUILDCFG_HEADER = ""\n') 189 f.write('BUILDCFG_HEADER = ""\n')
190 190
191 # Allow additional config through sdk-extra.conf
192 fn = bb.cookerdata.findConfigFile('sdk-extra.conf', d)
193 if fn:
194 with open(fn, 'r') as xf:
195 for line in xf:
196 f.write(line)
197
191 # If you define a sdk_extraconf() function then it can contain additional config 198 # If you define a sdk_extraconf() function then it can contain additional config
199 # (Though this is awkward; sdk-extra.conf should probably be used instead)
192 extraconf = (d.getVar('sdk_extraconf', True) or '').strip() 200 extraconf = (d.getVar('sdk_extraconf', True) or '').strip()
193 if extraconf: 201 if extraconf:
194 # Strip off any leading / trailing spaces 202 # Strip off any leading / trailing spaces