partitions & flashlayout: Prevent accident substring match

There is a case that I bitbake my-image when INITRAMFS_IMAGE
is my-image-initramfs. In this case my-image is a substring
of my-image-initramfs, causing ST's flashlayout and partitions
classes accidentally skip adding their tasks.

This patch makes sure to use exact string match during variable
checks.

Signed-off-by: Bumsik Kim <k.bumsik@gmail.com>
This commit is contained in:
Bumsik Kim authored and Christophe Priouzeau committed 2019-10-09 10:54:24 +02:00
1 parent 7d3d03fc48
commit 256eae27d9
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -135,7 +135,7 @@ python __anonymous () {
# Init partition list from PARTITIONS_IMAGE
image_partitions = (d.getVar('PARTITIONS_IMAGE') or "").split()
# We need to clearly identify ROOTFS build, not InitRAMFS one (if any)
if current_image_name not in image_partitions and current_image_name not in initramfs and current_image_name not in initrd:
if current_image_name not in image_partitions and current_image_name != initramfs and current_image_name != initrd:
# We need to make sure to add all extra dependencies as 'depends'
# for image_complete task
if d.getVar('FLASHLAYOUT_DEPEND_TASKS'):