From 001ab66c36b18b8a3f25b1116a8c6580c676a673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Draszik?= Date: Tue, 12 Apr 2016 09:14:40 +0100 Subject: [PATCH] image.bbclass: allow IMAGE_FSTYPES_DEBUGFS to be unset (as per the documentation) conf/local.conf.sample.extended describes IMAGE_FSTYPES_DEBUGFS as defaulting to IMAGE_FSTYPES if unset. If you actually do that, i.e. enable IMAGE_GEN_DEBUGFS but don't set IMAGE_FSTYPES_DEBUGFS, you get the following parse error: ERROR: Error executing a python function in : The stack trace of python calls that resulted in this exception/failure was: File: '', lineno: 14, function: 0010:__anon_38__meta_classes_rootfs_ipk_bbclass(d) 0011:__anon_113__meta_classes_image_bbclass(d) 0012:__anon_176__meta_classes_image_bbclass(d) 0013:__anon_146__meta_classes_siteinfo_bbclass(d) *** 0014:__anon_437__meta_classes_image_bbclass(d) File: 'meta/classes/image.bbclass', lineno: 322, function: __anon_437__meta_classes_image_bbclass 0318: typedeps = {} 0319: 0320: if d.getVar('IMAGE_GEN_DEBUGFS', True) == "1": 0321: debugfs_fstypes = d.getVar('IMAGE_FSTYPES_DEBUGFS', True).split() *** 0322: for t in debugfs_fstypes: 0323: alltypes.append("debugfs_" + t) 0324: 0325: def _add_type(t): 0326: baset = _image_base_type(t) Exception: AttributeError: 'NoneType' object has no attribute 'split' --- meta/classes/image.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index acaa9ec..59ba38e 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -318,8 +318,8 @@ python () { typedeps = {} if d.getVar('IMAGE_GEN_DEBUGFS', True) == "1": - debugfs_fstypes = d.getVar('IMAGE_FSTYPES_DEBUGFS', True).split() - for t in debugfs_fstypes: + debugfs_fstypes = d.getVar('IMAGE_FSTYPES_DEBUGFS', True) or '' + for t in debugfs_fstypes.split(): alltypes.append("debugfs_" + t) def _add_type(t): -- 2.8.1