]> code.ossystems Code Review - openembedded-core.git/commit
qemuboot: Fix build error if UNINATIVE_LOADER is unset
authorZoltán Böszörményi <zboszor@gmail.com>
Wed, 9 Feb 2022 16:02:48 +0000 (17:02 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 12 Feb 2022 17:02:56 +0000 (17:02 +0000)
commit020043c16ce25238313cbf0d10e40e9f6551bf14
tree6729984320ebac8aa92d82dde0dae9656a80c950
parentccee053b0f8696ba7185b28be1916a177742b4f4
qemuboot: Fix build error if UNINATIVE_LOADER is unset

I got this error on current master:

File: 'exec_func_python() autogenerated', lineno: 2, function: <module>
     0001:
 *** 0002:do_write_qemuboot_conf(d)
     0003:
File: '.../layers/openembedded-core/meta/classes/qemuboot.bbclass', lineno: 141, function: do_write_qemuboot_conf
     0137:        else:
     0138:            val = d.getVar(k)
     0139:        # we only want to write out relative paths so that we can relocate images
     0140:        # and still run them
 *** 0141:        if val.startswith(topdir):
     0142:            val = os.path.relpath(val, finalpath)
     0143:        cf.set('config_bsp', k, '%s' % val)
     0144:
     0145:    # QB_DEFAULT_KERNEL's value of KERNEL_IMAGETYPE is the name of a symlink
Exception: AttributeError: 'NoneType' object has no attribute 'startswith'

Do nothing if "val" is None, which may happen for k = "UNINATIVE_LOADER".

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/qemuboot.bbclass