Skip to content

Commit

Permalink
fixup! lmp/build: check availability of the image manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
quaresmajose committed Oct 1, 2024
1 parent b9d2a5a commit d3434a6
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lmp/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,25 +82,27 @@ rm -f ${DEPLOY_DIR_IMAGE}/*.txt
rm -f ${DEPLOY_DIR_IMAGE}/*.wic

# Link the license manifest for all the images produced by the build
for img in ${DEPLOY_DIR_IMAGE}/*${MACHINE}.manifest; do
for img in ${DEPLOY_DIR_IMAGE}/*${MACHINE}*.manifest; do
if ! [ -e "${img}" ]; then
status "Image manifest not found, license manifest will be skipped"
break
status "Image manifest not found, license manifest can't be collected"
eixt 1
fi
image_name=`basename ${img} | sed -e "s/.manifest//"`
image_name_id=`readlink ${img} | sed -e "s/\..*manifest//"`
if [ -f ${DEPLOY_DIR}/licenses/${image_name_id}/license.manifest ]; then
cp ${DEPLOY_DIR}/licenses/${image_name_id}/license.manifest ${DEPLOY_DIR_IMAGE}/${image_name_id}.license.manifest
ln -sf ${image_name_id}.license.manifest ${DEPLOY_DIR_IMAGE}/${image_name}.license.manifest
else
status "Image ${image_name_id} license.manifest not found, skipping"
status "Image ${image_name_id} license.manifest not found, license manifest can't be collected"
eixt 1
fi
# Also take care of the image_license, which contains the binaries used by wic outside the rootfs
if [ -f ${DEPLOY_DIR}/licenses/${image_name_id}/image_license.manifest ]; then
cp ${DEPLOY_DIR}/licenses/${image_name_id}/image_license.manifest ${DEPLOY_DIR_IMAGE}/${image_name_id}.image_license.manifest
ln -sf ${image_name_id}.image_license.manifest ${DEPLOY_DIR_IMAGE}/${image_name}.image_license.manifest
else
status "Image ${image_name_id} image_license.manifest not found, skipping"
status "Image ${image_name_id} image_license.manifest not found, license manifest can't be collected"
eixt 1
fi
done

Expand Down

0 comments on commit d3434a6

Please sign in to comment.