image_types.bbclass: only create links if the target exists
PATCH 1/1 image_types.bbclass: only create links if the target exists
When creating images containing many partitions, rootfs.$type may not be available.
Signed-off-by Andreas Oberritter <[email protected]>
--- meta/classes/image_types.bbclass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
meta/classes/image_types.bbclass +3 -1
@@ -95,7 +95,9 @@ runimagecmd () { # And create the symlinks if [ -n "${IMAGE_LINK_NAME}" ]; then for type in ${subimages}; do - ln -s ${IMAGE_NAME}.rootfs.$type ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.$type + if [ -e ${IMAGE_NAME}.rootfs.$type ]; then + ln -s ${IMAGE_NAME}.rootfs.$type ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.$type + fi done fi }
Signature · 1 line
1.7.10.4