* [PATCH 0/1] populate_sdk_ext.bbclass: add ESDK_MANIFEST_EXCLUDES @ 2017-11-15 6:38 Chen Qi 2017-11-15 6:38 ` [PATCH 1/1] " Chen Qi 0 siblings, 1 reply; 3+ messages in thread From: Chen Qi @ 2017-11-15 6:38 UTC (permalink / raw) To: openembedded-core The following changes since commit 4ed19ac8c19afd56d445d84e02b622cb056b8359: poky: Switch to post release name/version (2017-11-14 17:26:58 +0000) are available in the git repository at: git://git.pokylinux.org/poky-contrib ChenQi/esdk_manifest_excludes http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/esdk_manifest_excludes Chen Qi (1): populate_sdk_ext.bbclass: add ESDK_MANIFEST_EXCLUDES meta/classes/populate_sdk_ext.bbclass | 6 ++++++ 1 file changed, 6 insertions(+) -- 1.9.1 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] populate_sdk_ext.bbclass: add ESDK_MANIFEST_EXCLUDES 2017-11-15 6:38 [PATCH 0/1] populate_sdk_ext.bbclass: add ESDK_MANIFEST_EXCLUDES Chen Qi @ 2017-11-15 6:38 ` Chen Qi 2017-12-19 1:32 ` ChenQi 0 siblings, 1 reply; 3+ messages in thread From: Chen Qi @ 2017-11-15 6:38 UTC (permalink / raw) To: openembedded-core Add ESDK_MANIFEST_EXCLUDES to enable excluding items from 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 ESDK_MANIFEST_EXCLUDES to enable users to do this. This variable takes the form of glob matching. e.g. ESDK_MANIFEST_EXCLUDES = "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> --- meta/classes/populate_sdk_ext.bbclass | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass index 3620995..9ced3fc 100644 --- a/meta/classes/populate_sdk_ext.bbclass +++ b/meta/classes/populate_sdk_ext.bbclass @@ -485,12 +485,18 @@ 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('ESDK_MANIFEST_EXCLUDES') 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: + continue chksum = bb.utils.sha256_file(fn) f.write('%s\t%s\n' % (chksum, os.path.relpath(fn, baseoutpath))) } -- 1.9.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] populate_sdk_ext.bbclass: add ESDK_MANIFEST_EXCLUDES 2017-11-15 6:38 ` [PATCH 1/1] " Chen Qi @ 2017-12-19 1:32 ` ChenQi 0 siblings, 0 replies; 3+ messages in thread From: ChenQi @ 2017-12-19 1:32 UTC (permalink / raw) To: openembedded-core ping Could someone help review this patch? Thanks, Chen Qi On 11/15/2017 02:38 PM, Chen Qi wrote: > Add ESDK_MANIFEST_EXCLUDES to enable excluding items from 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 > ESDK_MANIFEST_EXCLUDES to enable users to do this. > > This variable takes the form of glob matching. > e.g. > ESDK_MANIFEST_EXCLUDES = "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> > --- > meta/classes/populate_sdk_ext.bbclass | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass > index 3620995..9ced3fc 100644 > --- a/meta/classes/populate_sdk_ext.bbclass > +++ b/meta/classes/populate_sdk_ext.bbclass > @@ -485,12 +485,18 @@ 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('ESDK_MANIFEST_EXCLUDES') 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: > + continue > chksum = bb.utils.sha256_file(fn) > f.write('%s\t%s\n' % (chksum, os.path.relpath(fn, baseoutpath))) > } ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-19 1:31 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-11-15 6:38 [PATCH 0/1] populate_sdk_ext.bbclass: add ESDK_MANIFEST_EXCLUDES Chen Qi 2017-11-15 6:38 ` [PATCH 1/1] " Chen Qi 2017-12-19 1:32 ` ChenQi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox