[OE-core] potential bashism in guile_2.0.13.bb

Khem Raj raj.khem at gmail.com
Wed Feb 1 17:03:53 UTC 2017



On 1/31/17 4:29 AM, Patrick Ohly wrote:
> Hello!
> 
> verify-bashisms (after some fixing of the script) reports:
> 
> /work/iot-ref-kit/openembedded-core/meta/recipes-devtools/guile/guile_2.0.13.bb
>  possible bashism in guile_cross_config line 94 ($'...' should be "$(printf '...')"):  
>         	echo '#!'`which ${BUILD_SYS}-guile`$' \\\n--no-auto-compile -e main -s\n!#\n(define %guile-build-info '\'\( \
> 			> ${B}/guile-config.cross
> 
> 
> This is for:
> 
> 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
> 
> And the resulting guile-config.cross has (when /bin/sh -> /bin/dash):
> 
> #!/fast/build/refkit/intel-corei7-64/tmp-glibc/work/corei7-64-refkit-linux/guile/2.0.13-r0/recipe-sysroot-native/usr/bin/x86_64-linux-guile$ \
> --no-auto-compile -e main -s
> !#
> (define %guile-build-info '(
> ...
> 
> This looks rather strange to me and I've no idea how the Linux kernel
> will interpret that first shebang line, which literally ends in
> ...guile$ \
> 
> Is the content as intended?

it should have come out as path to native guile with options, I think if
this is not happening it might just be installing wrong wrapper when
used it should complain. In any case its better to make it shell
independent.

> 
> It builds, whatever that means.
> 



More information about the Openembedded-core mailing list