image_types.bbclass: only create links if the target exists

When creating images containing many partitions, rootfs.$type
may not be available.

(From OE-Core rev: cf8e9d8942fdddaac21fca46137120da959c814c)

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Andreas Oberritter 2013-03-18 13:42:07 +01:00 committed by Richard Purdie
parent e5a2702653
commit a3409b909d
1 changed files with 3 additions and 1 deletions

View File

@ -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
}