gcc-cross: aviod creating invalid symlinks
authorRobert Yang <liezhi.yang@windriver.com>
Wed, 14 Mar 2012 09:13:21 +0000 (17:13 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 14 Mar 2012 13:17:41 +0000 (13:17 +0000)
commit6653238cec9ddac7c52d45cbf3a1f9c5084b5578
treee0a4fa032761ad560053c6fc44a7f45eb66ea94f
parent6a28479c9b6adb2e60a5ec7a844c4cb19d0c250c
gcc-cross: aviod creating invalid symlinks

There are several invalid symlinks in gcc-cross-initial,
gcc-cross-intermediate and gcc-cross, these cause the error:(56 errors)

tmp/work/i586-poky-linux/gcc-cross-initial-4.6.3+svnr184847-r23/temp/log.do_populate_sysroot:
log.do_populate_sysroot:grep: /path/to/invalid/symlink: No such file or directory

Avoid creating invalid symlinks would fix this problem.

Use the:
[ ! -e file ] || do_something
But not use:
[ -e file ] && do_something
is because that if the "file" doesn't exist, then the whole statement
would return false, and bitbake treats this an error, so use the "||" to
let it always be true.

[YOCTO #2095]

(From OE-Core rev: 7893e74311e53882d8f93ecb95a6bd9f5b14651e)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
meta/recipes-devtools/gcc/gcc-package-cross.inc