Patchwork libgcc: make sure symlinks are created in a valid directory

login
register
mail settings
Submitter Alexandru-Cezar Sardan
Date March 3, 2014, 5:45 p.m.
Message ID <1393868738-7330-1-git-send-email-alexandru.sardan@freescale.com>
Download mbox | patch
Permalink /patch/67893/
State Accepted
Commit 30b5a6ed25c4f341cb61482a75cb13c01f97de96
Headers show

Comments

Alexandru-Cezar Sardan - March 3, 2014, 5:45 p.m.
When adding extra symlinks, we have to make sure that the directory
that the links are created in is valid. Added a check for this.

This is an incremental addition to commit
97f2a81d6796ddaf7bbaab86c2ab9039673c732c

Signed-off-by: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
---
 meta/recipes-devtools/gcc/libgcc.inc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/meta/recipes-devtools/gcc/libgcc.inc b/meta/recipes-devtools/gcc/libgcc.inc
index b185660..96f1969 100644
--- a/meta/recipes-devtools/gcc/libgcc.inc
+++ b/meta/recipes-devtools/gcc/libgcc.inc
@@ -150,7 +150,7 @@  python do_extra_symlinks() {
     if targetsysnoext != d.getVar('TARGET_SYS', True):
         dest = d.getVar('D', True) + d.getVar('libdir', True) + '/' + targetsysnoext
         src = d.getVar('TARGET_SYS', True)
-        if not os.path.lexists(dest):
+        if not os.path.lexists(dest) and os.path.lexists(d.getVar('D', True) + d.getVar('libdir', True)):
             os.symlink(src, dest)
 }