]> code.ossystems Code Review - openembedded-core.git/commitdiff
image_types.bbclass: only create links if the target exists
authorAndreas Oberritter <obi@opendreambox.org>
Mon, 18 Mar 2013 12:42:07 +0000 (13:42 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 18 Mar 2013 13:26:59 +0000 (13:26 +0000)
When creating images containing many partitions, rootfs.$type
may not be available.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/image_types.bbclass

index 6bb113df4b7805937b57959655ae3072ff1b2480..f7b8314784c682db007f0abace7571db8d99f657 100644 (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
 }