All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] guile: Remove bashisms
@ 2016-09-26  6:51 zhe.he
  2016-10-08  8:18 ` He Zhe
  2016-10-10 13:15 ` Burton, Ross
  0 siblings, 2 replies; 4+ messages in thread
From: zhe.he @ 2016-09-26  6:51 UTC (permalink / raw)
  To: openembedded-core

From: He Zhe <zhe.he@windriver.com>

Remove bashisms from do_populate_sysroot task

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: He Zhe <zhe.he@windriver.com>
---
 meta/recipes-devtools/guile/guile_2.0.12.bb | 29 +++++++++++++++++------------
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/meta/recipes-devtools/guile/guile_2.0.12.bb b/meta/recipes-devtools/guile/guile_2.0.12.bb
index d2fe511..751a035 100644
--- a/meta/recipes-devtools/guile/guile_2.0.12.bb
+++ b/meta/recipes-devtools/guile/guile_2.0.12.bb
@@ -87,22 +87,27 @@ SYSROOT_PREPROCESS_FUNCS = "guile_cross_config"
 
 guile_cross_config() {
 	# this is only for target recipe
-	if [ "${PN}" = "guile" ]
-	then
-	        # Create guile-config returning target values instead of native values
-	        install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}
-        	echo '#!'`which ${BUILD_SYS}-guile`$' \\\n--no-auto-compile -e main -s\n!#\n(define %guile-build-info '\'\( \
-			> ${B}/guile-config.cross
-	        sed -n -e 's:^[ \t]*{[ \t]*":  (:' \
+	[ "${PN}" = "${BPN}" ] || return 0
+
+	vars=$(sed -n -e 's:^[ \t]*{[ \t]*":  (:' \
 			-e 's:",[ \t]*": . ":' \
 			-e 's:" *}, *\\:"):' \
 			-e 's:^.*cachedir.*$::' \
 			-e '/^  (/p' \
-			< ${B}/libguile/libpath.h >> ${B}/guile-config.cross
-	        echo '))' >> ${B}/guile-config.cross
-	        cat ${B}/meta/guile-config >> ${B}/guile-config.cross
-	        install ${B}/guile-config.cross ${STAGING_BINDIR_CROSS}/guile-config
-	fi
+			< ${B}/libguile/libpath.h)
+
+	# Create guile-config returning target values instead of native values
+	install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}
+	cat <<EOF >${B}/guile-config.cross
+#!$(which ${BUILD_SYS}-guile) \\
+--no-auto-compile -e main -s
+!#
+(define %guile-build-info '(
+$vars
+))
+EOF
+	cat ${B}/meta/guile-config >> ${B}/guile-config.cross
+	install ${B}/guile-config.cross ${SYSROOT_DESTDIR}${bindir_crossscripts}/guile-config
 }
 
 # Guile needs the compiled files to be newer than the source, and it won't
-- 
2.8.3



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

* Re: [PATCH] guile: Remove bashisms
  2016-09-26  6:51 [PATCH] guile: Remove bashisms zhe.he
@ 2016-10-08  8:18 ` He Zhe
  2016-10-10 13:15 ` Burton, Ross
  1 sibling, 0 replies; 4+ messages in thread
From: He Zhe @ 2016-10-08  8:18 UTC (permalink / raw)
  To: openembedded-core, Burton, Ross

Hi Ross,

This one is the latest version for previously reviewed "[OE-core] [PATCH v2] Remove bashisms", but I forgot mentioning it.

Thanks,
Zhe

On 09/26/2016 02:51 PM, zhe.he@windriver.com wrote:
> From: He Zhe <zhe.he@windriver.com>
>
> Remove bashisms from do_populate_sysroot task
>
> Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> Signed-off-by: He Zhe <zhe.he@windriver.com>
> ---
>  meta/recipes-devtools/guile/guile_2.0.12.bb | 29 +++++++++++++++++------------
>  1 file changed, 17 insertions(+), 12 deletions(-)
>
> diff --git a/meta/recipes-devtools/guile/guile_2.0.12.bb b/meta/recipes-devtools/guile/guile_2.0.12.bb
> index d2fe511..751a035 100644
> --- a/meta/recipes-devtools/guile/guile_2.0.12.bb
> +++ b/meta/recipes-devtools/guile/guile_2.0.12.bb
> @@ -87,22 +87,27 @@ SYSROOT_PREPROCESS_FUNCS = "guile_cross_config"
>  
>  guile_cross_config() {
>  	# this is only for target recipe
> -	if [ "${PN}" = "guile" ]
> -	then
> -	        # Create guile-config returning target values instead of native values
> -	        install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}
> -        	echo '#!'`which ${BUILD_SYS}-guile`$' \\\n--no-auto-compile -e main -s\n!#\n(define %guile-build-info '\'\( \
> -			> ${B}/guile-config.cross
> -	        sed -n -e 's:^[ \t]*{[ \t]*":  (:' \
> +	[ "${PN}" = "${BPN}" ] || return 0
> +
> +	vars=$(sed -n -e 's:^[ \t]*{[ \t]*":  (:' \
>  			-e 's:",[ \t]*": . ":' \
>  			-e 's:" *}, *\\:"):' \
>  			-e 's:^.*cachedir.*$::' \
>  			-e '/^  (/p' \
> -			< ${B}/libguile/libpath.h >> ${B}/guile-config.cross
> -	        echo '))' >> ${B}/guile-config.cross
> -	        cat ${B}/meta/guile-config >> ${B}/guile-config.cross
> -	        install ${B}/guile-config.cross ${STAGING_BINDIR_CROSS}/guile-config
> -	fi
> +			< ${B}/libguile/libpath.h)
> +
> +	# Create guile-config returning target values instead of native values
> +	install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}
> +	cat <<EOF >${B}/guile-config.cross
> +#!$(which ${BUILD_SYS}-guile) \\
> +--no-auto-compile -e main -s
> +!#
> +(define %guile-build-info '(
> +$vars
> +))
> +EOF
> +	cat ${B}/meta/guile-config >> ${B}/guile-config.cross
> +	install ${B}/guile-config.cross ${SYSROOT_DESTDIR}${bindir_crossscripts}/guile-config
>  }
>  
>  # Guile needs the compiled files to be newer than the source, and it won't



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

* Re: [PATCH] guile: Remove bashisms
  2016-09-26  6:51 [PATCH] guile: Remove bashisms zhe.he
  2016-10-08  8:18 ` He Zhe
@ 2016-10-10 13:15 ` Burton, Ross
  2016-10-11  9:04   ` He Zhe
  1 sibling, 1 reply; 4+ messages in thread
From: Burton, Ross @ 2016-10-10 13:15 UTC (permalink / raw)
  To: He Zhe; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 549 bytes --]

On 26 September 2016 at 07:51, <zhe.he@windriver.com> wrote:

> Remove bashisms from do_populate_sysroot task
>

This causes a change of behaviour that results in a stage error:

ERROR: guile-2.0.12-r0 do_populate_sysroot: The recipe guile is trying to
install files into a shared area when those files already exist. Those
files and their manifest location are:

 /data/poky-master/tmp-glibc/sysroots/intel-corei7-64/usr/bin/crossscripts/guile-config
 Matched in b''
Please verify which recipe should provide the above files.

Ross

[-- Attachment #2: Type: text/html, Size: 1231 bytes --]

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

* Re: [PATCH] guile: Remove bashisms
  2016-10-10 13:15 ` Burton, Ross
@ 2016-10-11  9:04   ` He Zhe
  0 siblings, 0 replies; 4+ messages in thread
From: He Zhe @ 2016-10-11  9:04 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

Thanks for pointing out.

This seems caused by the correction of installation path of guile-config(from ${STAGING_BINDIR_CROSS} to ${SYSROOT_DESTDIR}${bindir_crossscripts}). We first put things in ${SYSROOT_DESTDIR}. And then do_populate_sysroot collects them from ${SYSROOT_DESTDIR} and install them into ${STAGING_BINDIR_CROSS}. But if we first put guile-configin ${STAGING_BINDIR_CROSS}, as we did before, and then apply this patch and then rebuild, the system will find guile-confighas existed in ${STAGING_BINDIR_CROSS} but cannot find who installed it(Matched in b''). So this is probably a wrong report. This error will not appear if I manually delete ${STAGING_BINDIR_CROSS}/guile-config and rebuild, or rebuild in a brand new project.

Zhe


On 10/10/2016 09:15 PM, Burton, Ross wrote:
>
> On 26 September 2016 at 07:51, <zhe.he@windriver.com <mailto:zhe.he@windriver.com>>wrote:
>
>     Remove bashisms from do_populate_sysroot task
>
>
> This causes a change of behaviour that results in a stage error:
>
> ERROR: guile-2.0.12-r0 do_populate_sysroot: The recipe guile is trying to install files into a shared area when those files already exist. Those files and their manifest location are:
>    /data/poky-master/tmp-glibc/sysroots/intel-corei7-64/usr/bin/crossscripts/guile-config
>  Matched in b''
> Please verify which recipe should provide the above files.
>
> Ross



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

end of thread, other threads:[~2016-10-11  9:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-26  6:51 [PATCH] guile: Remove bashisms zhe.he
2016-10-08  8:18 ` He Zhe
2016-10-10 13:15 ` Burton, Ross
2016-10-11  9:04   ` He Zhe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.