[oe-commits] Andreas Oberritter : image_types.bbclass: only create links if the target exists

git at git.openembedded.org git at git.openembedded.org
Mon Mar 18 21:25:05 UTC 2013


Module: openembedded-core.git
Branch: master
Commit: cf8e9d8942fdddaac21fca46137120da959c814c
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=cf8e9d8942fdddaac21fca46137120da959c814c

Author: Andreas Oberritter <obi at opendreambox.org>
Date:   Mon Mar 18 13:42:07 2013 +0100

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 <obi at opendreambox.org>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/image_types.bbclass |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 6bb113d..f7b8314 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -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
 }





More information about the Openembedded-commits mailing list