From: Marcus Folkesson <marcus.folkesson@gmail.com>
To: kweihmann@outlook.com
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH v4 2/2] image-bootfiles.bbclass: new class, copy boot files to root filesystem
Date: Mon, 17 Jun 2024 08:23:53 +0200 [thread overview]
Message-ID: <Zm_WeSIfRTx9T5o9@gmail.com> (raw)
In-Reply-To: <20106.1718512009844562919@lists.openembedded.org>
[-- Attachment #1: Type: text/plain, Size: 1699 bytes --]
Hi Konrad,
Thanks for your comments!
On Sat, Jun 15, 2024 at 09:26:49PM -0700, Konrad Weihmann via lists.openembedded.org wrote:
> Looking at the combination of the patches and the following
>
> + boot_files = d.getVar("IMAGE_BOOT_FILES")
> + if boot_files is None:
> + return
> +
> + install_files = get_boot_files(deploy_image_dir, boot_files)
> + if install_files is None:
> + bb.warn("Could not find any boot files to install even though IMAGE_BOOT_FILES is not empty")
> + return
>
> get_boot_files only returns None if boot_files is None, which is caught already earlier on here, so the bb.warn clause likely will not be reached
You are right. The case i wanted to cover was if install_files was an
empty list.
This could occour if using asterix, e.g. IMAGE_BOOT_FILES = "bootfile.*" and there is
no "bootfile.*" in the DEPLOY_DIR.
>
> Personally a check like `if install_files:` would make more sense
I think I will keep the check but change it to
if not install_files:
Does that make sense?
>
> IMAGE_PREPROCESS_COMMAND += "bootfiles_populate;"
>
> I'm not sure if that wouldn't raise issues if any of the packages would install a file by the same path/name as also set here.
>
> In my opinion moving it to a POSTPROCESS function with some checks that it won't overwrite any files/folders might be the better option
Looking through the documentation, I think ROOTFS_POSTPROCESS_COMMAND
could be a candidate.
I'm not sure which one I prefer though.
Check that it won't overwrite any files/folder could be a good thing. I
will implement that and raise an error if the file/folder already
exists.
Best regards,
Marcus Folkesson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2024-06-17 6:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-30 9:53 [PATCH v4 0/2] image-bootfiles: new class Marcus Folkesson
2024-05-30 9:53 ` [PATCH v4 1/2] bootimg-partition: break out code to a common library Marcus Folkesson
2024-05-30 9:53 ` [PATCH v4 2/2] image-bootfiles.bbclass: new class, copy boot files to root filesystem Marcus Folkesson
2024-05-31 12:09 ` Quentin Schulz
2024-06-16 4:26 ` Konrad Weihmann
2024-06-17 6:23 ` Marcus Folkesson [this message]
2024-06-11 10:37 ` [OE-core] [PATCH v4 0/2] image-bootfiles: new class Ross Burton
2024-06-11 13:22 ` Marcus Folkesson
2024-06-11 14:44 ` Martin Hundebøll
2024-06-11 15:04 ` Marcus Folkesson
2024-07-16 11:28 ` Ross Burton
2024-07-22 7:36 ` Marcus Folkesson
2024-06-14 20:25 ` Marcus Folkesson
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=Zm_WeSIfRTx9T5o9@gmail.com \
--to=marcus.folkesson@gmail.com \
--cc=kweihmann@outlook.com \
--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.