@@ -38,10 +38,10 @@ def swupdate_expand_bitbake_variables(d, s):
m = re.match(r"^(?P<before_placeholder>.+)@@(?P<bitbake_variable_name>\w+)@@(?P<after_placeholder>.+)$", line)
if m:
bitbake_variable_value = d.getVar(m.group('bitbake_variable_name'), True)
- if bitbake_variable_value:
- write_lines.append(m.group('before_placeholder') + bitbake_variable_value + m.group('after_placeholder') + "\n");
- else:
- bb.fatal("BitBake variable %s not set" % (m.group('bitbake_variable_name')))
+ if bitbake_variable_value is None:
+ bitbake_variable_value = ""
+ bb.warn("BitBake variable %s not set" % (m.group('bitbake_variable_name')))
+ write_lines.append(m.group('before_placeholder') + bitbake_variable_value + m.group('after_placeholder') + "\n");
else:
write_lines.append(line)
Even if the current check remind that a variable is maybe missing, there are use cases where it is useful to replace an empty variable. Signed-off-by: Stefano Babic <sbabic@denx.de> --- classes/swupdate-common.bbclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)