dm-verity: set staging correctly in case basename has changed

Fix the verity class when the IMAGE_BASENAME has changed. Prefer DM_VERITY_IMAGE
for staging env and wic fragment so it matchs what is used in the
dm-verity-image-initramfs and the base wks systemd-bootdisk-dmverity.wks.in.

Signed-off-by: Louis Rannou <louis.rannou@non.se.com>
Signed-off-by: Louis Rannou <louis.rannou@syslinbit.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
Louis Rannou
2024-05-20 21:33:47 +02:00
committed by Armin Kuster
parent 29d46054c2
commit 8c9cdd60e4

View File

@@ -63,8 +63,8 @@ DEPENDS += "bc-native"
# convert it to some better format. Let's drop the first line (doesn't contain
# any useful info) and feed the rest to a script.
process_verity() {
local ENV="${STAGING_VERITY_DIR}/${IMAGE_BASENAME}.$TYPE.verity.env"
local WKS_INC="${STAGING_VERITY_DIR}/${IMAGE_BASENAME}.$TYPE.wks.in"
local ENV="${STAGING_VERITY_DIR}/${DM_VERITY_IMAGE}.$TYPE.verity.env"
local WKS_INC="${STAGING_VERITY_DIR}/${DM_VERITY_IMAGE}.$TYPE.wks.in"
rm -f $ENV
# Each line contains a key and a value string delimited by ':'. Read the