Patchwork [03/12] image.bbclass: rm symlink destination via ln

login
register
mail settings
Submitter Bernhard Reutner-Fischer
Date Jan. 3, 2011, 8:01 p.m.
Message ID <1294084926-3115-3-git-send-email-rep.dot.nop@gmail.com>
Download mbox | patch
Permalink /patch/159/
State Accepted
Headers show

Comments

Bernhard Reutner-Fischer - Jan. 3, 2011, 8:01 p.m.
Rather than rm'ing the destination-file manually, do ln -f

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
---
 classes/image.bbclass |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
Roman Khimov - Jan. 3, 2011, 8:31 p.m.
? ????????? ?? ??????????? 03 ?????? 2011 23:01:57 ????? Bernhard Reutner-
Fischer ???????:
> Rather than rm'ing the destination-file manually, do ln -f
> 
> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>

Acked-by: Roman I Khimov <khimov@altell.ru>

Patch

diff --git a/classes/image.bbclass b/classes/image.bbclass
index 7c1f3e1..db13dd0 100644
--- a/classes/image.bbclass
+++ b/classes/image.bbclass
@@ -140,8 +140,7 @@  def get_imagecmds(d):
         cmd  = "\t#Code for image type " + type + "\n"
         cmd += "\t${IMAGE_CMD_" + type + "}\n"
         cmd += "\tcd ${DEPLOY_DIR_IMAGE}/\n"
-        cmd += "\trm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}." + type + "\n"
-        cmd += "\tln -s ${IMAGE_NAME}.rootfs." + type + " ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}." + type + "\n\n"
+        cmd += "\tln -fs ${IMAGE_NAME}.rootfs." + type + " ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}." + type + "\n\n"
         cmds += bb.data.expand(cmd, localdata)
     return cmds