Skip to content
Snippets Groups Projects
Commit e52d1f24 authored by Andrei Gherzan's avatar Andrei Gherzan :penguin:
Browse files

ohos-image.bbclass: Avoid duplicates in install_task when deploying boot assets


The code detects when boot assets would overwrite something already
deployed/installed in the rootfs. This helps to avoid breaking packaging
at runtime. On the other hand, if IMAGE_BOOT_FILES has duplicates, this
check will fail when trying to install the same file multiple times. To
avoid this, treat the install_task as a set.

Signed-off-by: Andrei Gherzan's avatarAndrei Gherzan <andrei.gherzan@huawei.com>
parent 5e52c720
No related branches found
No related tags found
No related merge requests found
...@@ -160,7 +160,7 @@ python deploy_boot_artifacts_to_rootfs() { ...@@ -160,7 +160,7 @@ python deploy_boot_artifacts_to_rootfs() {
else: else:
install_task.append((src, dst)) install_task.append((src, dst))
for task in install_task: for task in set(install_task):
src_path, dst_path = task src_path, dst_path = task
bb.debug(1, 'Install %s as %s' % (src_path, dst_path)) bb.debug(1, 'Install %s as %s' % (src_path, dst_path))
if os.path.exists(os.path.join(rootfs_dir, dst_path)): if os.path.exists(os.path.join(rootfs_dir, dst_path)):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment