[pacman-dev] [PATCH] libalpm: Explicitly run install scriptlets in bash.

Aaron Griffin aaronmgriffin at gmail.com
Tue Jul 28 13:54:25 EDT 2009


On Tue, Jul 28, 2009 at 12:46 PM, Loui Chang<louipc.ist at gmail.com> wrote:
> On Tue 28 Jul 2009 18:50 +0200, Xavier wrote:
>> On Tue, Jul 28, 2009 at 6:34 PM, Loui Chang<louipc.ist at gmail.com> wrote:
>> > I was experimenting using dash as /bin/sh and noticed that a lot of
>> > packages were having errors in their install scriptlets.
>> >
>> > popen passes commands to /bin/sh so we need to explicitly invoke bash,
>> > which the scriptlets are written for. WOO!
>> >
>> > Signed-off-by: Loui Chang <louipc.ist at gmail.com>
>>
>> see http://bugs.archlinux.org/task/13803
>
> Hmm sticky situation.
> If that's the case, there needs to be better documentation.
>
> I assumed that install scripts could be written for bash just as
> makepkg and PKGBUILDs require bash. Is there any intention to make those
> dash compatible for consistency?
>
> It isn't reasonable to expect users to write those scripts for dash when
> other packaging scripts require bash to function properly.
>
> That, and /bin/sh still points to bash by default in Arch.
> Though that's out of pacman's scope, I think it's something to consider.

Another thought would be to make the scriptlet executable and pass the
"function" as an arg to the script, this way we can support
#!/bin/bash and #!/bin/sh as well as a myriad of other things


More information about the pacman-dev mailing list