diff options
| author | Zoltán Böszörményi <zboszor@gmail.com> | 2022-02-09 17:02:48 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-24 11:12:39 +0000 |
| commit | 58dd3fcada4903cb7074b10d483639ebb94ea531 (patch) | |
| tree | 8116f1b67156f7f4e2c8d59fb3531c45c1f975a0 /meta/classes | |
| parent | 4e2cfc6b111d26895ed3578ba7f7c5564159bafe (diff) | |
| download | poky-58dd3fcada4903cb7074b10d483639ebb94ea531.tar.gz | |
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".
(From OE-Core rev: d59dd9098224e93cf866ddbb618cadcb1021fa63)
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 020043c16ce25238313cbf0d10e40e9f6551bf14)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
| -rw-r--r-- | meta/classes/qemuboot.bbclass | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/classes/qemuboot.bbclass b/meta/classes/qemuboot.bbclass index bf529e9aa4..5e7e7c0659 100644 --- a/meta/classes/qemuboot.bbclass +++ b/meta/classes/qemuboot.bbclass | |||
| @@ -131,6 +131,8 @@ python do_write_qemuboot_conf() { | |||
| 131 | 'qemu-helper-native/1.0-r1/recipe-sysroot-native/usr/bin/') | 131 | 'qemu-helper-native/1.0-r1/recipe-sysroot-native/usr/bin/') |
| 132 | else: | 132 | else: |
| 133 | val = d.getVar(k) | 133 | val = d.getVar(k) |
| 134 | if val is None: | ||
| 135 | continue | ||
| 134 | # we only want to write out relative paths so that we can relocate images | 136 | # we only want to write out relative paths so that we can relocate images |
| 135 | # and still run them | 137 | # and still run them |
| 136 | if val.startswith(topdir): | 138 | if val.startswith(topdir): |
