aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2017-11-15 14:00:44 +0800
committerRobert Yang <liezhi.yang@windriver.com>2018-07-13 10:31:53 +0800
commit47efbcebc355a5c00a4e53d4a137b86b33278d0a (patch)
treea76c1d3b963333fc72b61af601331a8ecef95b5f
parentb63af566e440719ccf8deb58dd684a1c2f3269ef (diff)
downloadopenembedded-core-contrib-rbt/fix_from_wr.tar.gz
populate_sdk_ext.bbclass: add SDK_CONF_MANIFEST_EXCLUDErbt/fix_from_wr
Add SDK_CONF_MANIFEST_EXCLUDE to enable excluding items in sdk-conf-manifest. By default, files under conf/ are all added to sdk-conf-manifest, as the manifest file is set to 'conf/*'. However, there are situations where some configuration files under conf/ directory are not intended to be added to sdk-conf-manifest, thus adding SDK_CONF_MANIFEST_EXCLUDE to enable users to do this. This variable takes the form of glob matching. e.g. SDK_CONF_MANIFEST_EXCLUDE = "conf/autogen*" This would exclude all files under conf/ starting with 'autogen' from sdk-conf-manifest. Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-rw-r--r--meta/classes/populate_sdk_ext.bbclass7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index 9c31d70f2a..bbe6c5949a 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -479,12 +479,19 @@ python copy_buildsystem () {
# sdk_ext_postinst() below) thus the checksum we take here would always
# be different.
manifest_file_list = ['conf/*']
+ esdk_manifest_excludes = (d.getVar('SDK_CONF_MANIFEST_EXCLUDE') or '').split()
+ esdk_manifest_excludes_list = []
+ for exclude_item in esdk_manifest_excludes:
+ esdk_manifest_excludes_list += glob.glob(os.path.join(baseoutpath, exclude_item))
manifest_file = os.path.join(baseoutpath, 'conf', 'sdk-conf-manifest')
with open(manifest_file, 'w') as f:
for item in manifest_file_list:
for fn in glob.glob(os.path.join(baseoutpath, item)):
if fn == manifest_file:
continue
+ if fn in esdk_manifest_excludes_list:
+ bb.note('Exclude %s since it is in SDK_CONF_MANIFEST_EXCLUDE' % fn)
+ continue
chksum = bb.utils.sha256_file(fn)
f.write('%s\t%s\n' % (chksum, os.path.relpath(fn, baseoutpath)))
}