Making bash a formal requirement for build-infra?
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Wed Sep 19 04:57:45 PDT 2012
I was thinking of making bash a formal requirement for build-infra. In
practice, this means that we should check if bash is present in
configure, and fail directly otherwise.
Right now, I believe we have several "bash-isms" as it is already, but
we try to execute with whatever shell we have, and we'll just get weird
and hard-to-debug failures. The autoconf framework will, as it first
action, go and look for bash, and run the generated configure script
using bash, if that is available (regardless of what shell was used to
start the configure script). Therefore we are unlikely to notice any
bash-isms during development of build-infra.
I believe that we can count on bash being installed on all platforms we
support, with the possible exception of Solaris systems -- I don't know
how common it is to have bash there. On linux, cygwin and macosx I think
it's ubiquitous.
If we choose *not* to require bash, then we really must start testing
our scripts with other shells. Since autoconf will autodetect bash if
present, that means setting up a machine where there is no bash
installed (the horror! :-)).
If we conclude that we want to have bash as a formal requirement, that
would mean that we can write much easier shell code, mostly in the
configure script but possible also in the makefiles.
Any thoughts on this?
/Magnus
More information about the build-infra-dev
mailing list