aviod creating invalid symlinks
cover aviod creating invalid symlinks
The following changes since commit 81379dc141e245307ca391a02b7490b199128991:
dates: Fix unpackaged files warning (2012-03-13 23:18:19 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib robert/gcc
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/gcc
Robert Yang (1):
gcc-cross: aviod creating invalid symlinks
.../gcc/gcc-cross-intermediate.inc | 3 ++- meta/recipes-devtools/gcc/gcc-package-cross.inc | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-)
Signature · 1 line
1.7.4.1
PATCH 1/1 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]
--- .../gcc/gcc-cross-intermediate.inc | 3 ++- meta/recipes-devtools/gcc/gcc-package-cross.inc | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-)
meta/recipes-devtools/gcc/gcc-cross-intermediate.inc +2 -1
@@ -51,7 +51,8 @@ do_install () { dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/ install -d $dest for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do - ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t + [ ! -e ${BINRELPATH}/${TARGET_PREFIX}$t ] || \ + ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t done }
meta/recipes-devtools/gcc/gcc-package-cross.inc +4 -2
@@ -19,8 +19,10 @@ do_install () { dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/ install -d $dest for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do - ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t - ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t ${dest}${TARGET_PREFIX}$t + if [ -e ${BINRELPATH}/${TARGET_PREFIX}$t ]; then + ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t + ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t ${dest}${TARGET_PREFIX}$t + fi done # Remove things we don't need but keep share/java
Signature · 1 line
1.7.4.1
Re: [PATCH 1/1] gcc-cross: aviod creating invalid symlinks
Quoted 45 lines · Robert Yang
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 directoryAvoid 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]
Signed-off-by Robert Yang <[email protected]>--- .../gcc/gcc-cross-intermediate.inc | 3 ++- meta/recipes-devtools/gcc/gcc-package-cross.inc | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-)meta/recipes-devtools/gcc/gcc-cross-intermediate.inc +2
-1@@ -51,7 +51,8 @@ do_install () { dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/ install -d $dest for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do - ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t + [ ! -e ${BINRELPATH}/${TARGET_PREFIX}$t ] || \ + ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t done }meta/recipes-devtools/gcc/gcc-package-cross.inc +0
-0@@ -19,8 +19,10 @@ do_install () { dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/ install -d $dest
meta/recipes-devtools/gcc/gcc-package-cross.inc do_install () { · line 28
Quoted 10 lines
meta/recipes-devtools/gcc/gcc-package-cross.inc +4
-2for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do - ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t - ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t ${dest}${TARGET_PREFIX}$t + if [ -e ${BINRELPATH}/${TARGET_PREFIX}$t ]; then + ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t + ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t ${dest}${TARGET_PREFIX}$t + fi done # Remove things we don't need but keep share/java
I've had to revert this, it totally broke the mips/ppc/arm toolchains.
See the failures on the autobuilder, e.g.
http://autobuilder.yoctoproject.org:8010/builders/nightly-arm/builds/338/steps/shell_33/logs/stdio in eglibc-initial. The problem is that the location we're symlinking to may not be installed yet. For example, gcc provides "${TARGET_PREFIX}gcc" but it won't be installed at the location we point at until after gcc's populate_sysroot function runs. The tests you're using are therefore not adding as many symlinks as we need.
Cheers,
Richard
Re: [PATCH 1/1] gcc-cross: aviod creating invalid symlinks
Quoted 55 lines · Richard Purdie
Quoted 54 lines · Robert Yang
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 directoryAvoid 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]
Signed-off-by Robert Yang<[email protected]>--- .../gcc/gcc-cross-intermediate.inc | 3 ++- meta/recipes-devtools/gcc/gcc-package-cross.inc | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-)meta/recipes-devtools/gcc/gcc-cross-intermediate.inc +2
-1@@ -51,7 +51,8 @@ do_install () { dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/ install -d $dest for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do - ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t + [ ! -e ${BINRELPATH}/${TARGET_PREFIX}$t ] || \ + ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t done }meta/recipes-devtools/gcc/gcc-package-cross.inc +4
-2@@ -19,8 +19,10 @@ do_install () { dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/ install -d $dest for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do - ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t - ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t ${dest}${TARGET_PREFIX}$t + if [ -e ${BINRELPATH}/${TARGET_PREFIX}$t ]; then + ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t + ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t ${dest}${TARGET_PREFIX}$t + fi done
Quoted 7 lines
meta/recipes-devtools/gcc/gcc-package-cross.inc do_install () { · line 28
Quoted 1 line
meta/recipes-devtools/gcc/gcc-package-cross.inc +0
-0# Remove things we don't need but keep share/javaI've had to revert this, it totally broke the mips/ppc/arm toolchains.
See the failures on the autobuilder, e.g.
http://autobuilder.yoctoproject.org:8010/builders/nightly-arm/builds/338/steps/shell_33/logs/stdio in eglibc-initial. The problem is that the location we're symlinking to may not be installed yet. For example, gcc provides "${TARGET_PREFIX}gcc" but it won't be installed at the location we point at until after gcc'spopulate_sysrootfunction runs. The tests you're using are therefore not adding as many symlinks as we need.
I'm really sorry for this, I will drop the it.
// Robert
Quoted 11 lines
Cheers,
Richard
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Richard Purdie
AppliedQuoted 10 lines · Robert Yang
The following changes since commit
81379dc141e245307ca391a02b7490b199128991:dates: Fix unpackaged files warning (2012-03-13 23:18:19 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contribrobert/gcc
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/gccRobert Yang (1):
gcc-cross: aviod creating invalid symlinks
Merged to master, thanks.
Cheers,
Richard