[pacman-dev] configurable shell for install scripts
Allan McRae
allan at archlinux.org
Sun Mar 28 13:44:28 CEST 2010
Hi,
I thought I'd run this past people on this list before I spent the two
weeks that this would take me to figure out how to implement it!
This is motivated by experience packaging for Arch. Install scriptlets
are written assuming /bin/sh is bash, which is true on a default
system. But some people want to change their /bin/sh to (e.g.) dash.
As pacman uses the default shell (as given by /bin/sh) to run install
scriptlets, pointing /bin/sh at dash may cause failures when bash
specific features are used.
So I thought, why not manually specify the shell for install scriptlets
in pacman.conf. Something like "INSTALL_SHELL=/bin/sh" by default.
Then _alpm_runscriptlet would call something like "<shell> -c ".
<scriptlet path> && <function>" (which works for bash, dash, zsh, pdksh).
Comments?
Allan
More information about the pacman-dev
mailing list