From patchwork Wed Feb 29 05:41:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2/3] image_types.bbclass: properly support IMAGE_LINK_NAME as empty Date: Wed, 29 Feb 2012 05:41:17 -0000 From: Otavio Salvador X-Patchwork-Id: 22399 Message-Id: <515e5d34c437e37115e4005738a2b2c8055508cf.1330494042.git.otavio@ossystems.com.br> To: openembedded-core@lists.openembedded.org Signed-off-by: Otavio Salvador --- 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..f9ed49f 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 len(d.getVar('IMAGE_LINK_NAME', True)) > 0: + 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):