Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] aviod creating invalid symlinks
@ 2012-03-14  9:13 Robert Yang
  2012-03-14  9:13 ` [PATCH 1/1] gcc-cross: " Robert Yang
  2012-03-14 13:23 ` [PATCH 0/1] " Richard Purdie
  0 siblings, 2 replies; 5+ messages in thread
From: Robert Yang @ 2012-03-14  9:13 UTC (permalink / raw)
  To: openembedded-core

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(-)

-- 
1.7.4.1




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/1] gcc-cross: aviod creating invalid symlinks
  2012-03-14  9:13 [PATCH 0/1] aviod creating invalid symlinks Robert Yang
@ 2012-03-14  9:13 ` Robert Yang
  2012-03-14 15:26   ` Richard Purdie
  2012-03-14 13:23 ` [PATCH 0/1] " Richard Purdie
  1 sibling, 1 reply; 5+ messages in thread
From: Robert Yang @ 2012-03-14  9:13 UTC (permalink / raw)
  To: openembedded-core

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]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 .../gcc/gcc-cross-intermediate.inc                 |    3 ++-
 meta/recipes-devtools/gcc/gcc-package-cross.inc    |    6 ++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc b/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
index ea105e6..87d11ab 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
@@ -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
 }
 
diff --git a/meta/recipes-devtools/gcc/gcc-package-cross.inc b/meta/recipes-devtools/gcc/gcc-package-cross.inc
index e32412c..3d52d23 100644
--- a/meta/recipes-devtools/gcc/gcc-package-cross.inc
+++ b/meta/recipes-devtools/gcc/gcc-package-cross.inc
@@ -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
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/1] aviod creating invalid symlinks
  2012-03-14  9:13 [PATCH 0/1] aviod creating invalid symlinks Robert Yang
  2012-03-14  9:13 ` [PATCH 1/1] gcc-cross: " Robert Yang
@ 2012-03-14 13:23 ` Richard Purdie
  1 sibling, 0 replies; 5+ messages in thread
From: Richard Purdie @ 2012-03-14 13:23 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Wed, 2012-03-14 at 17:13 +0800, Robert Yang wrote:
> 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

Merged to master, thanks.

Cheers,

Richard




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] gcc-cross: aviod creating invalid symlinks
  2012-03-14  9:13 ` [PATCH 1/1] gcc-cross: " Robert Yang
@ 2012-03-14 15:26   ` Richard Purdie
  2012-03-15  2:23     ` Robert Yang
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Purdie @ 2012-03-14 15:26 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Wed, 2012-03-14 at 17:13 +0800, Robert Yang wrote:
> 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]
> 
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
>  .../gcc/gcc-cross-intermediate.inc                 |    3 ++-
>  meta/recipes-devtools/gcc/gcc-package-cross.inc    |    6 ++++--
>  2 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc b/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
> index ea105e6..87d11ab 100644
> --- a/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
> +++ b/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
> @@ -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
>  }
>  
> diff --git a/meta/recipes-devtools/gcc/gcc-package-cross.inc b/meta/recipes-devtools/gcc/gcc-package-cross.inc
> index e32412c..3d52d23 100644
> --- a/meta/recipes-devtools/gcc/gcc-package-cross.inc
> +++ b/meta/recipes-devtools/gcc/gcc-package-cross.inc
> @@ -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


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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] gcc-cross: aviod creating invalid symlinks
  2012-03-14 15:26   ` Richard Purdie
@ 2012-03-15  2:23     ` Robert Yang
  0 siblings, 0 replies; 5+ messages in thread
From: Robert Yang @ 2012-03-15  2:23 UTC (permalink / raw)
  To: openembedded-core



On 03/14/2012 11:26 PM, Richard Purdie wrote:
> On Wed, 2012-03-14 at 17:13 +0800, Robert Yang wrote:
>> 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]
>>
>> Signed-off-by: Robert Yang<liezhi.yang@windriver.com>
>> ---
>>   .../gcc/gcc-cross-intermediate.inc                 |    3 ++-
>>   meta/recipes-devtools/gcc/gcc-package-cross.inc    |    6 ++++--
>>   2 files changed, 6 insertions(+), 3 deletions(-)
>>
>> diff --git a/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc b/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
>> index ea105e6..87d11ab 100644
>> --- a/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
>> +++ b/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
>> @@ -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
>>   }
>>
>> diff --git a/meta/recipes-devtools/gcc/gcc-package-cross.inc b/meta/recipes-devtools/gcc/gcc-package-cross.inc
>> index e32412c..3d52d23 100644
>> --- a/meta/recipes-devtools/gcc/gcc-package-cross.inc
>> +++ b/meta/recipes-devtools/gcc/gcc-package-cross.inc
>> @@ -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
>
>
> 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.
>

I'm really sorry for this, I will drop the it.

// Robert

> Cheers,
>
> Richard
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-03-15  2:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-14  9:13 [PATCH 0/1] aviod creating invalid symlinks Robert Yang
2012-03-14  9:13 ` [PATCH 1/1] gcc-cross: " Robert Yang
2012-03-14 15:26   ` Richard Purdie
2012-03-15  2:23     ` Robert Yang
2012-03-14 13:23 ` [PATCH 0/1] " Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox