kernel-fitimage: avoid duplicated items in KERNEL_IMAGETYPE_FOR_MAKE
PATCH 1/1 kernel-fitimage: avoid duplicated items in KERNEL_IMAGETYPE_FOR_MAKE
From: Ming Liu <[email protected]>
When replacementtype is already in KERNEL_IMAGETYPE_FOR_MAKE, we do not have to replace fitImage with it again, that will lead to duplicated items in KERNEL_IMAGETYPE_FOR_MAKE.
Signed-off-by Ming Liu <[email protected]>
--- meta/classes/kernel-fitimage.bbclass | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
meta/classes/kernel-fitimage.bbclass +6 -2
@@ -25,8 +25,12 @@ python __anonymous () { # to kernel.bbclass . We have to override it, since we pack zImage # (at least for now) into the fitImage . typeformake = d.getVar("KERNEL_IMAGETYPE_FOR_MAKE") or "" - if 'fitImage' in typeformake.split(): - d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', typeformake.replace('fitImage', replacementtype)) + typeformakelist = typeformake.split() + if 'fitImage' in typeformakelist: + if replacementtype in typeformakelist: + d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', typeformake.replace('fitImage', '')) + else: + d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', typeformake.replace('fitImage', replacementtype)) image = d.getVar('INITRAMFS_IMAGE') if image:
Signature · 1 line
2.7.4