Patchwork [3/3,v2] image-vmdk: Fix error recreating symbolic link

login
register
mail settings
Submitter Jonathan Liu
Date May 9, 2013, 12:15 p.m.
Message ID <1368101748-4701-1-git-send-email-net147@gmail.com>
Download mbox | patch
Permalink /patch/49627/
State Accepted
Commit 00aa0b315b9c66a98a6c0abe2519427a966557a0
Headers show

Comments

Jonathan Liu - May 9, 2013, 12:15 p.m.
If the vmdk image symbolic link already exists from a previous build,
overwrite it instead of returning an error.

Signed-off-by: Jonathan Liu <net147@gmail.com>
---
 meta/classes/image-vmdk.bbclass | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch

diff --git a/meta/classes/image-vmdk.bbclass b/meta/classes/image-vmdk.bbclass
index 6f7df3f..70234e2 100644
--- a/meta/classes/image-vmdk.bbclass
+++ b/meta/classes/image-vmdk.bbclass
@@ -18,8 +18,7 @@  inherit boot-directdisk
 
 create_vmdk_image () {
 	qemu-img convert -O vmdk ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.vmdk
-	ln -s ${IMAGE_NAME}.vmdk ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.vmdk
-
+	ln -sf ${IMAGE_NAME}.vmdk ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.vmdk
 }
 
 python do_vmdkimg() {