All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Joshua Watt" <JPEWhacker@gmail.com>
To: Justin Bronder <jsbronder@cold-front.org>,
	openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] populate_sdk_ext: copy BBMULTICONFIG files
Date: Wed, 16 Jun 2021 15:42:45 -0500	[thread overview]
Message-ID: <5a4482c8-a237-3195-eb6f-95c0ded9920f@gmail.com> (raw)
In-Reply-To: <20210616202709.5143-1-jsbronder@cold-front.org>

[-- Attachment #1: Type: text/plain, Size: 2877 bytes --]


On 6/16/21 3:27 PM, Justin Bronder wrote:
> 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
>
> Signed-off-by: Justin Bronder <jsbronder@cold-front.org>
> ---
>   meta/classes/populate_sdk_ext.bbclass | 12 +++++++++++-
>   1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
> index fe840d9cfb..71f601fa9b 100644
> --- a/meta/classes/populate_sdk_ext.bbclass
> +++ b/meta/classes/populate_sdk_ext.bbclass
> @@ -397,6 +397,13 @@ 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
> +    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,)
> +            shutil.copyfile(builddir + dest_stub, baseoutpath + dest_stub)
multiconfig files can live in layers also, so they may not be in the the 
users conf/multiconfig directory. I'm not sure if you need to copy them 
for the esdk to work, but at a minimum if you don't find a multiconfig 
in the users conf directory it shouldn't be an error
> +
>       if os.path.exists(builddir + '/cache/bb_unihashes.dat'):
>           bb.parse.siggen.save_unitaskhashes()
>           bb.utils.mkdirhier(os.path.join(baseoutpath, 'cache'))
> @@ -556,6 +563,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 +574,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
>
> 
>

[-- Attachment #2: Type: text/html, Size: 3513 bytes --]

      reply	other threads:[~2021-06-16 20:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-16 20:27 [PATCH] populate_sdk_ext: copy BBMULTICONFIG files Justin Bronder
2021-06-16 20:42 ` Joshua Watt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5a4482c8-a237-3195-eb6f-95c0ded9920f@gmail.com \
    --to=jpewhacker@gmail.com \
    --cc=jsbronder@cold-front.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.