Patchwork uboot-config.bbclass: Fix use without IMAGE_FSTYPES appending

login
register
mail settings
Submitter Otavio Salvador
Date Oct. 7, 2013, 3:15 p.m.
Message ID <1381158916-2648-1-git-send-email-otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/59343/
State Accepted
Commit f93071fb22f8d8b03691a59547fe312be6e7bf8f
Headers show

Comments

Otavio Salvador - Oct. 7, 2013, 3:15 p.m.
Before checking if the image is a valid value, we need to check if the
list of items is big enough or we will raise an exception.

Reported-by: Lauren Post <lauren.post@freescale.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 meta/classes/uboot-config.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Otavio Salvador - Oct. 7, 2013, 3:41 p.m.
On Mon, Oct 7, 2013 at 12:30 PM, Post Lauren-RAA013
<RAA013@freescale.com> wrote:
> This works and is needed otherwise we can't set the UBOOT_CONFIG for uboot configs that do not require an FSTYPE.  Please accept this change otherwise some of our uboot builds are broken.

Thanks for confirming it worked for you.

Patch

diff --git a/meta/classes/uboot-config.bbclass b/meta/classes/uboot-config.bbclass
index 09a0c0f..ba01bff 100644
--- a/meta/classes/uboot-config.bbclass
+++ b/meta/classes/uboot-config.bbclass
@@ -47,7 +47,8 @@  python () {
             bb.debug(1, "Setting UBOOT_MACHINE to %s." % items[0])
             d.setVar('UBOOT_MACHINE', items[0])
 
-            if items[1]:
+            # IMAGE_FSTYPES appending
+            if len(items) > 1 and items[1]:
                 bb.debug(1, "Appending '%s' to IMAGE_FSTYPES." % items[1])
                 d.appendVar('IMAGE_FSTYPES', ' ' + items[1])
 }