Re: [PATCH v4 2/2] image-bootfiles.bbclass: new class, copy boot files to root filesystem

Konrad Weihmann
2024-06-16T04:26:55Z

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

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

Personally a check like `if install_files:` would make more 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

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