Web lists-archives.com

Re: [ANNOUNCEMENT] Updated: dash-0.5.9.1-1




On 02/23/2017 01:59 PM, Brian Inglis wrote:
>> If script succeeds, then yes sh is now a symlink to Dash, but only
>> for my system. I still have to use #!/bin/dash with my scripts,
>> because otherwise people with Bash -> sh will not get the speed
>> boost. The whole point of this thread is that it should be changed
>> for everyone.
> 
> And should be done using update_alternatives so it and associated 
> man pages can easily be changed if anyone suffers breakage.
> Some people may continue to need or prefer using bash in POSIX mode.

Or more likely, many people likely have pre-existing scripts wrongly
written as #!/bin/sh but which use bash-ism rather than portable
POSIX-specified shell (if it is portable, then bash vs. dash executing
the script shouldn't matter - but as Debian found out when they switched
to dash, there are a lot of non-portable scripts).  On the other hand,
Debian has already fixed much of the pre-packaged badness out there and
pushed fixes upstream where feasible, so these days it's not as hairy to
switch as when Debian first did it.

But part of me is still reluctant to make the switch as long as Fedora
still favors bash over dash.

One problem with using update_alternatives: the alternatives system
relies on symlinks, but Windows is not so smart about executing through
symlinks; are there people that will have a broken setup if /bin/sh is a
symlink rather than an actual executable (hard links are fine, but
symlinks is where I worry).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature