summaryrefslogtreecommitdiffstats
path: root/meta/classes/populate_sdk_ext.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/populate_sdk_ext.bbclass')
-rw-r--r--meta/classes/populate_sdk_ext.bbclass17
1 files changed, 17 insertions, 0 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index 2fc4c11730..08130d48bf 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -16,6 +16,7 @@ SDK_RDEPENDS_append_task-populate-sdk-ext = " ${SDK_TARGETS}"
SDK_RELOCATE_AFTER_INSTALL_task-populate-sdk-ext = "0"
SDK_META_CONF_WHITELIST ?= "MACHINE DISTRO PACKAGE_CLASSES"
+SDK_LOCAL_CONF_WHITELIST ?= ""
SDK_TARGETS ?= "${PN}"
OE_INIT_ENV_SCRIPT ?= "oe-init-build-env"
@@ -108,12 +109,28 @@ python copy_buildsystem () {
f.write(' "\n')
# Create local.conf
+ local_conf_whitelist = d.getVar('SDK_LOCAL_CONF_WHITELIST', True).split()
+ def handle_var(varname, origvalue, op, newlines):
+ if origvalue.strip().startswith('/') and not varname in local_conf_whitelist:
+ newlines.append('# Removed original setting of %s\n' % varname)
+ return None, op, 0, True
+ else:
+ return origvalue, op, 0, True
+ varlist = ['[^#=+ ]*']
+ builddir = d.getVar('TOPDIR', True)
+ with open(builddir + '/conf/local.conf', 'r') as f:
+ oldlines = f.readlines()
+ (updated, newlines) = bb.utils.edit_metadata(oldlines, varlist, handle_var)
+
with open(baseoutpath + '/conf/local.conf', 'w') as f:
f.write('# WARNING: this configuration has been automatically generated and in\n')
f.write('# most cases should not be edited. If you need more flexibility than\n')
f.write('# this configuration provides, it is strongly suggested that you set\n')
f.write('# up a proper instance of the full build system and use that instead.\n\n')
+ for line in newlines:
+ f.write(line)
+
f.write('INHERIT += "%s"\n\n' % 'uninative')
f.write('CONF_VERSION = "%s"\n\n' % d.getVar('CONF_VERSION'))