[oe-commits] Otavio Salvador : image_types.bbclass: properly support IMAGE_LINK_NAME as empty

git at git.openembedded.org git at git.openembedded.org
Wed Feb 29 12:59:02 UTC 2012


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

Author: Otavio Salvador <otavio at ossystems.com.br>
Date:   Wed Feb 29 05:41:17 2012 +0000

image_types.bbclass: properly support IMAGE_LINK_NAME as empty

[RP: Remove unneeded len()]
Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/image_types.bbclass |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 74071c1..aeb69a4 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -25,7 +25,9 @@ def get_imagecmds(d):
             types.append("ext3")
         types.remove("live")
 
-    cmds += "	rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.*"
+    if d.getVar('IMAGE_LINK_NAME', True):
+        cmds += "	rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.*"
+
     for type in types:
         ccmd = []
         subimages = []
@@ -55,10 +57,12 @@ runimagecmd () {
 	# Now create the needed compressed versions
 	cd ${DEPLOY_DIR_IMAGE}/
         ${ccmd}
-	# And create the symlinks
-        for type in ${subimages}; do
-		ln -s ${IMAGE_NAME}.rootfs.$type ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.$type
-	done
+        # 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
+            done
+        fi
 }
 
 def imagetypes_getdepends(d):





More information about the Openembedded-commits mailing list