diff options
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/populate_sdk_ext.bbclass | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass index 0ea974d4ff..5e2ebd7969 100644 --- a/meta/classes/populate_sdk_ext.bbclass +++ b/meta/classes/populate_sdk_ext.bbclass | |||
@@ -164,6 +164,9 @@ python copy_buildsystem () { | |||
164 | f.write(' $' + '{SDKBASEMETAPATH}/workspace \\\n') | 164 | f.write(' $' + '{SDKBASEMETAPATH}/workspace \\\n') |
165 | f.write(' "\n') | 165 | f.write(' "\n') |
166 | 166 | ||
167 | env_whitelist = (d.getVar('BB_ENV_EXTRAWHITE', True) or '').split() | ||
168 | env_whitelist_values = {} | ||
169 | |||
167 | # Create local.conf | 170 | # Create local.conf |
168 | builddir = d.getVar('TOPDIR', True) | 171 | builddir = d.getVar('TOPDIR', True) |
169 | if derivative: | 172 | if derivative: |
@@ -176,6 +179,8 @@ python copy_buildsystem () { | |||
176 | newlines.append('# Removed original setting of %s\n' % varname) | 179 | newlines.append('# Removed original setting of %s\n' % varname) |
177 | return None, op, 0, True | 180 | return None, op, 0, True |
178 | else: | 181 | else: |
182 | if varname in env_whitelist: | ||
183 | env_whitelist_values[varname] = origvalue | ||
179 | return origvalue, op, 0, True | 184 | return origvalue, op, 0, True |
180 | varlist = ['[^#=+ ]*'] | 185 | varlist = ['[^#=+ ]*'] |
181 | with open(builddir + '/conf/local.conf', 'r') as f: | 186 | with open(builddir + '/conf/local.conf', 'r') as f: |
@@ -241,6 +246,21 @@ python copy_buildsystem () { | |||
241 | if line.strip() and not line.startswith('#'): | 246 | if line.strip() and not line.startswith('#'): |
242 | f.write(line) | 247 | f.write(line) |
243 | 248 | ||
249 | # Ensure any variables set from the external environment (by way of | ||
250 | # BB_ENV_EXTRAWHITE) are set in the SDK's configuration | ||
251 | extralines = [] | ||
252 | for name, value in env_whitelist_values.iteritems(): | ||
253 | actualvalue = d.getVar(name, True) or '' | ||
254 | if value != actualvalue: | ||
255 | extralines.append('%s = "%s"\n' % (name, actualvalue)) | ||
256 | if extralines: | ||
257 | with open(baseoutpath + '/conf/local.conf', 'a') as f: | ||
258 | f.write('\n') | ||
259 | f.write('# Extra settings from environment:\n') | ||
260 | for line in extralines: | ||
261 | f.write(line) | ||
262 | f.write('\n') | ||
263 | |||
244 | # Filter the locked signatures file to just the sstate tasks we are interested in | 264 | # Filter the locked signatures file to just the sstate tasks we are interested in |
245 | excluded_targets = d.getVar('SDK_TARGETS', True) | 265 | excluded_targets = d.getVar('SDK_TARGETS', True) |
246 | sigfile = d.getVar('WORKDIR', True) + '/locked-sigs.inc' | 266 | sigfile = d.getVar('WORKDIR', True) + '/locked-sigs.inc' |