Patchwork [bitbake-devel] bitbake fetch2/file: fix symlink not created issue

login
register
mail settings
Submitter Ting Liu
Date July 16, 2014, 10:38 a.m.
Message ID <1405507107-30079-1-git-send-email-b28495@freescale.com>
Download mbox | patch
Permalink /patch/75767/
State New
Headers show

Comments

Ting Liu - July 16, 2014, 10:38 a.m.
From: Ting Liu <ting.liu@freescale.com>

Signed-off-by: Ting Liu <ting.liu@freescale.com>
---
 bitbake/lib/bb/fetch2/__init__.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

Patch

diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index dcada12..7a4e43b 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -835,7 +835,10 @@  def try_mirror_url(origud, ud, ld, check = False):
                 # Broken symbolic link
                 os.unlink(origud.localpath)
 
-            os.symlink(ud.localpath, origud.localpath)
+            bb.utils.mkdirhier(os.path.dirname(origud.localpath))
+            src = os.path.join(dldir, ud.localpath)
+            os.symlink(src, origud.localpath)
+
         update_stamp(origud, ld)
         return ud.localpath