@@ -99,3 +99,11 @@ IMAGE_CMD:swu() {
fi
done | cpio -ovL -H crc > "${BUILDCHROOT_IMAGE_FILE}"'
}
+
+python do_check_swu_partition_uuids() {
+ for u in ['A', 'B']:
+ if not d.getVar('ABROOTFS_PART_UUID_' + u):
+ bb.fatal('ABROOTFS_PART_UUID_' + u + ' not set')
+}
+
+addtask check_swu_partition_uuids before do_image_swu
@@ -15,9 +15,3 @@ inherit read-only-rootfs
IMAGE_INSTALL += " swupdate"
IMAGE_INSTALL += " swupdate-handler-roundrobin"
-
-python() {
- for u in ['A', 'B']:
- if not d.getVar('ABROOTFS_PART_UUID_' + u):
- bb.fatal('ABROOTFS_PART_UUID_' + u + ' not set')
-}
This patch moves the partition uuid check into a task to only execute the logic in case an swu image is built. Previously this was checked at parse time, leading to errors when not setting these variables and building an image without swupdate support from an layer that also provides images with swupdate support. Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> --- classes/swupdate.bbclass | 8 ++++++++ recipes-core/images/swupdate.inc | 6 ------ 2 files changed, 8 insertions(+), 6 deletions(-)