From eef25f70d4153b65059d107121bf435780957a5e Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Wed, 20 Dec 2023 09:50:36 -0300 Subject: image_type_tezi: Create unversioned symlink to tarball This makes it easier to reference a custom produced image in a deploy or customization (e.g. with torizoncore-builder) workflow. Variable names and the link command are modeled after /meta-toradex-torizon/recipes-bsp/u-boot/u-boot-ota.inc Signed-off-by: Rafael Beims Signed-off-by: Matthijs Kooijman (cherry picked from commit 92816700a8c6e2650198420f98bd834fe9213c13) --- classes/image_type_tezi.bbclass | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/classes/image_type_tezi.bbclass b/classes/image_type_tezi.bbclass index 2c7c432..89396b3 100644 --- a/classes/image_type_tezi.bbclass +++ b/classes/image_type_tezi.bbclass @@ -479,14 +479,20 @@ IMAGE_CMD:teziimg () { curl -k --retry 5 -O ${TEZI_EULA_URL} || true fi + local outfile stdoutfile + outfile=${TEZI_IMAGE_NAME}-Tezi_${TEZI_VERSION}.tar + stdoutfile=${TEZI_IMAGE_NAME}-Tezi.tar + # The first transform strips all folders from the files to tar, the # second transform "moves" them in a subfolder ${TEZI_IMAGE_NAME}-Tezi_${TEZI_VERSION}. ${IMAGE_CMD_TAR} \ --transform='s/.*\///' \ --transform 's,^,${TEZI_IMAGE_NAME}-Tezi_${TEZI_VERSION}/,' \ - -chf ${IMGDEPLOYDIR}/${TEZI_IMAGE_NAME}-Tezi_${TEZI_VERSION}.tar \ + -chf "${IMGDEPLOYDIR}/${outfile}" \ toradexlinux.png marketing.tar prepare.sh wrapup.sh ${TEZI_EULA_FILE} \ ${WORKDIR}/image-json/image.json ${TEZI_ARTIFACTS} + + ln -sf "${outfile}" "${IMGDEPLOYDIR}/${stdoutfile}" } do_image_teziimg[dirs] += "${WORKDIR}/image-json ${DEPLOY_DIR_IMAGE}" do_image_teziimg[cleandirs] += "${WORKDIR}/image-json" -- cgit v1.2.3