@@ -48,13 +48,9 @@ class BootimgPartitionPlugin(SourcePlugin):
raise WicError("Couldn't find DEPLOY_DIR_IMAGE, exiting")
boot_files = None
- for (fmt, id) in (("_uuid-%s", part.uuid), ("_label-%s", part.label), (None, None)):
- if fmt:
- var = fmt % id
- else:
- var = ""
-
- boot_files = get_bitbake_var("IMAGE_BOOT_FILES" + var)
+ vars = ("IMAGE_BOOT_FILES_uuid-%s" % part.uuid, "IMAGE_BOOT_FILES_label-%s" % part.label, "IMAGE_BOOT_FILES")
+ for var in vars:
+ boot_files = get_bitbake_var(var)
if boot_files is not None:
break
bootimg-partition fills a partition for the files specified with the IMAGE_BOOT_FILES variable, optionally suffixed with _label-<label> or _uuid-<uuid>. Simplify the variables lookup to make this logic clearer to read. Signed-off-by: Vivien Didelot <vdidelot@pbsc.com> --- scripts/lib/wic/plugins/source/bootimg-partition.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)