From 2834c2f853bd0d988dd1e35d4300005be05f8b19 Mon Sep 17 00:00:00 2001 From: Justin Bronder Date: Mon, 21 Jun 2021 13:50:28 -0400 Subject: populate_sdk_ext: copy BBMULTICONFIG files As the generated local.conf includes BBMULTICONFIG, the referenced files in conf/multiconfig also need to be copied. Otherwise with BBMULTICONFIG="abc" for instance, building the esdk fails with: ERROR: ParseError at tmp/build-glibc/work/qemux86_64-oe-linux/core-image-ssh/1.0-r0/sdk-ext/image/tmp-renamed-sdk/layers/openembedded-core/meta/conf/bitbake.conf:767: Could not include required file conf/multiconfig/abc.conf (From OE-Core rev: 8bc339b83a45becc0c7edf016fcce187152669e3) Signed-off-by: Justin Bronder Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- meta/classes/populate_sdk_ext.bbclass | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'meta/classes/populate_sdk_ext.bbclass') diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass index fe840d9cfb..517b4e45ff 100644 --- a/meta/classes/populate_sdk_ext.bbclass +++ b/meta/classes/populate_sdk_ext.bbclass @@ -397,6 +397,14 @@ python copy_buildsystem () { f.write('require conf/locked-sigs.inc\n') f.write('require conf/unlocked-sigs.inc\n') + # Copy multiple configurations if they exist in the users config directory + if d.getVar('BBMULTICONFIG') is not None: + bb.utils.mkdirhier(os.path.join(baseoutpath, 'conf', 'multiconfig')) + for mc in d.getVar('BBMULTICONFIG').split(): + dest_stub = "/conf/multiconfig/%s.conf" % (mc,) + if os.path.exists(builddir + dest_stub): + shutil.copyfile(builddir + dest_stub, baseoutpath + dest_stub) + if os.path.exists(builddir + '/cache/bb_unihashes.dat'): bb.parse.siggen.save_unitaskhashes() bb.utils.mkdirhier(os.path.join(baseoutpath, 'cache')) @@ -556,6 +564,9 @@ python copy_buildsystem () { # sdk_ext_postinst() below) thus the checksum we take here would always # be different. manifest_file_list = ['conf/*'] + if d.getVar('BBMULTICONFIG') is not None: + manifest_file_list.append('conf/multiconfig/*') + esdk_manifest_excludes = (d.getVar('ESDK_MANIFEST_EXCLUDES') or '').split() esdk_manifest_excludes_list = [] for exclude_item in esdk_manifest_excludes: @@ -564,7 +575,7 @@ python copy_buildsystem () { 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: + if fn == manifest_file or os.path.isdir(fn): continue if fn in esdk_manifest_excludes_list: continue -- cgit v1.2.3-54-g00ecf