[Portland] Scripts Are Written for Bash But Run With #!/bin/sh -- Broken on Ubuntu 7.04 (And 6.10?)

Nathan Kidd nathan-svn at spicycrypto.ca
Fri Apr 27 10:07:57 PDT 2007


Hi,

I just discovered yesterday that xdk-utils is broken on X/K/Ubuntu 7.04
(and it seems 6.10, though I only tried 7.04) because they switched to
using Dash as the /bin/sh symlink, instead of Bash.  Like many other
scripts (my own xdk-utils wrapper included), the xdk-utils scripts
execute with #!/bin/sh but actually use bashisms (e.g. pushd/popd).

I believe we need to change the xdk-utils scripts to either A) use
strict POSIX shell commands only (more work, but more portable), or B)
change to #!/bin/bash explicitly (easy to do, potentially less portable).

I'm happy to provide a patch to move to #!/bin/bash if that's the
direction chosen. I haven't looked to see how much effort a patch going
the other way would be; it may only be pushd/popd that are the problem.

-Nathan
______

Why they changed from bash to dash: https://wiki.ubuntu.com/DashAsBinSh

Several long discussions, the summary of which is: "Yes we know changing
to dash as /bin/sh is going to break stuff.  No, we won't change back
because we get serious performance benefits from dash. Any script that
requires bash but only asks for /bin/sh is broken."
https://launchpad.net/ubuntu/+question/1932
https://bugs.launchpad.net/ubuntu/+source/dash/+bug/61463





More information about the Portland mailing list