[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openembedded-core
Subject:    [OE-Core][PATCH 1/2] wic: bootimg-partition: simplify BOOT_IMAGE_FILES logic
From:       "Vivien Didelot" <vivien.didelot () gmail ! com>
Date:       2022-01-30 14:25:26
Message-ID: 20220130142527.2960188-1-vdidelot () pbsc ! com
[Download RAW message or body]

Content-Transfer-Encoding: 8bit

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(-)

diff --git a/scripts/lib/wic/plugins/source/bootimg-partition.py \
b/scripts/lib/wic/plugins/source/bootimg-partition.py index 5dbe2558d2..f22364766a \
                100644
--- a/scripts/lib/wic/plugins/source/bootimg-partition.py
+++ b/scripts/lib/wic/plugins/source/bootimg-partition.py
@@ -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
 
-- 
2.35.0



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#161114): https://lists.openembedded.org/g/openembedded-core/message/161114
Mute This Topic: https://lists.openembedded.org/mt/88792278/4454766
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [openembedded-core@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic