]> code.ossystems Code Review - openembedded-core.git/commitdiff
libgcc: make sure symlinks are created in a valid directory
authorAlexandru-Cezar Sardan <alexandru.sardan@freescale.com>
Mon, 3 Mar 2014 17:45:38 +0000 (19:45 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 7 Mar 2014 14:55:26 +0000 (14:55 +0000)
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>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/recipes-devtools/gcc/libgcc.inc

index b185660ffd1b881319c878b483a40236e6d361e4..96f1969d9028ca428528a3dd41126aa70769d2a4 100644 (file)
@@ -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)
 }