qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/5] configure to set shell type


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 1/5] configure to set shell type
Date: Fri, 16 Mar 2012 13:24:52 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120215 Thunderbird/10.0.2

Am 16.03.2012 13:15, schrieb Peter Maydell:
> On 16 March 2012 12:02, Lee Essen <address@hidden> wrote:
>> Adds support to configure for controlling which shell to use, defaults to 
>> "sh" as before
>> but adds "bash" for Solaris/Illumos builds. Plus ensures that tracetool is 
>> called with a
>> shell.
> 
> Ugh. If we have bashisms in our shell scripts/configure/makefiles etc we 
> should
> fix them, not paper over them.
> 
> If Solaris' /bin/sh isn't a POSIX sh that's a bug in Solaris :-)

Nah, Sun had really long support cycles and used to provide a POSIX sh
alongside their old sh for compatibility with themselves. ;-) We found
that actually documented in their man pages while investigating that in
response to my bug report. (Lee, don't forget to search the archives!)

> 
>> -echo "                           Available backends:" 
>> $("$source_path"/scripts/tracetool --list-backends)
>> +echo "                           Available backends:" $($shell 
>> "$source_path"/scripts/tracetool --list-backends)
> 
> This shouldn't be necessary -- tracetool has a #!/bin/sh at the top.
> If it needs bash then that should be fixed.

No, please. I'd be okay with setting shell="bash" in a reasonably
limited environment (say, Solaris 11) but not with requiring bash for
all platforms.

The issue here is really just getting a fully POSIX-conformant shell.
And the way I expect this to work is by executing configure and make in
such a shell and by not having hardcoded /bin/sh creep in through some
shebang line.

Andreas

>> -sh "$source_path/scripts/tracetool" "--$trace_backend" --check-backend > 
>> /dev/null 2> /dev/null
>> +$shell "$source_path/scripts/tracetool" "--$trace_backend" --check-backend 
>> > /dev/null 2> /dev/null
> 
> ...and we shouldn't need to use either 'sh' or '$shell' here...
> 
> -- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]