Patchwork eglibc: fix evacuate_scripts for external toolchains

login
register
mail settings
Submitter Marcin Juszkiewicz
Date Jan. 25, 2013, 2:27 p.m.
Message ID <1359124075-3504-1-git-send-email-marcin.juszkiewicz@linaro.org>
Download mbox | patch
Permalink /patch/43375/
State New
Headers show

Comments

Marcin Juszkiewicz - Jan. 25, 2013, 2:27 p.m.
Not every external toolchain has mtrace/sotruss/xtrace scripts so check
their existance first.

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
---
 meta/recipes-core/eglibc/eglibc-package.inc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Giuseppe CONDORELLI - Jan. 25, 2013, 2:32 p.m.
Well done Marcin,
I've just  met this issue working with my local external-toolchain and I had
to
locally patch the same .inc for checking. :)

Thanks for having highlighted that in the mailing list.
Regards,
Giuseppe

>-----Original Message-----
>From: openembedded-core-bounces@lists.openembedded.org
>[mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf
>Of Marcin Juszkiewicz
>Sent: venerdì 25 gennaio 2013 15:28
>To: openembedded-core@lists.openembedded.org
>Subject: [OE-core] [PATCH] eglibc: fix evacuate_scripts for external
toolchains
>
>Not every external toolchain has mtrace/sotruss/xtrace scripts so check
their
>existance first.
>
>Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
>---
> meta/recipes-core/eglibc/eglibc-package.inc | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
>diff --git a/meta/recipes-core/eglibc/eglibc-package.inc b/meta/recipes-
>core/eglibc/eglibc-package.inc
>index 79c43f1..4a4e54a 100644
>--- a/meta/recipes-core/eglibc/eglibc-package.inc
>+++ b/meta/recipes-core/eglibc/eglibc-package.inc
>@@ -113,7 +113,9 @@ do_evacuate_scripts () {
> 	target=${D}${includedir}/eglibc-scripts-internal-
>${MULTIMACH_TARGET_SYS}
> 	mkdir -p $target
> 	for i in ${bashscripts}; do
>-		cp ${D}${bindir}/$i $target/
>+	    if [ -f ${D}${bindir}/$i ]; then
>+		    cp ${D}${bindir}/$i $target/
>+		fi
> 	done
> }
>
>--
>1.8.0
>
>
>_______________________________________________
>Openembedded-core mailing list
>Openembedded-core@lists.openembedded.org
>http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Richard Purdie - Jan. 25, 2013, 2:33 p.m.
On Fri, 2013-01-25 at 15:27 +0100, Marcin Juszkiewicz wrote:
> Not every external toolchain has mtrace/sotruss/xtrace scripts so check
> their existance first.
> 
> Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
> ---
>  meta/recipes-core/eglibc/eglibc-package.inc | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-core/eglibc/eglibc-package.inc b/meta/recipes-core/eglibc/eglibc-package.inc
> index 79c43f1..4a4e54a 100644
> --- a/meta/recipes-core/eglibc/eglibc-package.inc
> +++ b/meta/recipes-core/eglibc/eglibc-package.inc
> @@ -113,7 +113,9 @@ do_evacuate_scripts () {
>  	target=${D}${includedir}/eglibc-scripts-internal-${MULTIMACH_TARGET_SYS}
>  	mkdir -p $target
>  	for i in ${bashscripts}; do
> -		cp ${D}${bindir}/$i $target/
> +	    if [ -f ${D}${bindir}/$i ]; then
> +		    cp ${D}${bindir}/$i $target/
> +		fi
>  	done
>  }

At least lets try and indent it consistently :)

Cheers,

Richard
Giuseppe CONDORELLI - Jan. 25, 2013, 2:35 p.m.
However, what about the resultant libraries as well as libsotruss?
Do we have to also to remove them from file inclusion to avoid warnings?

Cheers,
Giuseppe

>-----Original Message-----
>From: Giuseppe Condorelli [mailto:giuseppe.condorelli@st.com]
>Sent: venerdì 25 gennaio 2013 15:32
>To: 'Marcin Juszkiewicz'; 'openembedded-core@lists.openembedded.org'
>Subject: RE: [OE-core] [PATCH] eglibc: fix evacuate_scripts for external
>toolchains
>
>Well done Marcin,
>I've just  met this issue working with my local external-toolchain and I
had to
>locally patch the same .inc for checking. :)
>
>Thanks for having highlighted that in the mailing list.
>Regards,
>Giuseppe
>
>>-----Original Message-----
>>From: openembedded-core-bounces@lists.openembedded.org
>>[mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf
>Of
>>Marcin Juszkiewicz
>>Sent: venerdì 25 gennaio 2013 15:28
>>To: openembedded-core@lists.openembedded.org
>>Subject: [OE-core] [PATCH] eglibc: fix evacuate_scripts for external
>>toolchains
>>
>>Not every external toolchain has mtrace/sotruss/xtrace scripts so check
>>their existance first.
>>
>>Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
>>---
>> meta/recipes-core/eglibc/eglibc-package.inc | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>>diff --git a/meta/recipes-core/eglibc/eglibc-package.inc
>>b/meta/recipes- core/eglibc/eglibc-package.inc index 79c43f1..4a4e54a
>>100644
>>--- a/meta/recipes-core/eglibc/eglibc-package.inc
>>+++ b/meta/recipes-core/eglibc/eglibc-package.inc
>>@@ -113,7 +113,9 @@ do_evacuate_scripts () {
>> 	target=${D}${includedir}/eglibc-scripts-internal-
>>${MULTIMACH_TARGET_SYS}
>> 	mkdir -p $target
>> 	for i in ${bashscripts}; do
>>-		cp ${D}${bindir}/$i $target/
>>+	    if [ -f ${D}${bindir}/$i ]; then
>>+		    cp ${D}${bindir}/$i $target/
>>+		fi
>> 	done
>> }
>>
>>--
>>1.8.0
>>
>>
>>_______________________________________________
>>Openembedded-core mailing list
>>Openembedded-core@lists.openembedded.org
>>http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Martin Jansa - Jan. 25, 2013, 2:36 p.m.
On Fri, Jan 25, 2013 at 03:27:55PM +0100, Marcin Juszkiewicz wrote:
> Not every external toolchain has mtrace/sotruss/xtrace scripts so check
> their existance first.
> 
> Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
> ---
>  meta/recipes-core/eglibc/eglibc-package.inc | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-core/eglibc/eglibc-package.inc b/meta/recipes-core/eglibc/eglibc-package.inc
> index 79c43f1..4a4e54a 100644
> --- a/meta/recipes-core/eglibc/eglibc-package.inc
> +++ b/meta/recipes-core/eglibc/eglibc-package.inc
> @@ -113,7 +113,9 @@ do_evacuate_scripts () {
>  	target=${D}${includedir}/eglibc-scripts-internal-${MULTIMACH_TARGET_SYS}
>  	mkdir -p $target
>  	for i in ${bashscripts}; do
> -		cp ${D}${bindir}/$i $target/
> +	    if [ -f ${D}${bindir}/$i ]; then
> +		    cp ${D}${bindir}/$i $target/
> +		fi

Please don't use mix of spaces and tabs for indentation.

>  	done
>  }
>  
> -- 
> 1.8.0
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Patch

diff --git a/meta/recipes-core/eglibc/eglibc-package.inc b/meta/recipes-core/eglibc/eglibc-package.inc
index 79c43f1..4a4e54a 100644
--- a/meta/recipes-core/eglibc/eglibc-package.inc
+++ b/meta/recipes-core/eglibc/eglibc-package.inc
@@ -113,7 +113,9 @@  do_evacuate_scripts () {
 	target=${D}${includedir}/eglibc-scripts-internal-${MULTIMACH_TARGET_SYS}
 	mkdir -p $target
 	for i in ${bashscripts}; do
-		cp ${D}${bindir}/$i $target/
+	    if [ -f ${D}${bindir}/$i ]; then
+		    cp ${D}${bindir}/$i $target/
+		fi
 	done
 }