[arch-dev-public] install scripts in core

Allan McRae allan at archlinux.org
Tue Feb 3 10:27:23 EST 2009

Xavier wrote:
> On Mon, Feb 2, 2009 at 6:24 PM, Aaron Griffin <aaronmgriffin at gmail.com> wrote:
>> The way pacman calls the scriptlets, it actually uses the shell from
>> the _parent_ system. I know this for a fact, because Dan and I
>> investigated, added checks for bash in the chroot, then realized it
>> didn't matter and reverted it.
>> Are you _sure_ it's bash failing like you suspect? What happens if you
>> just install vi and library deps in a chroot and try to run things
>> manually?
> I am not sure why we are talking about bash here, the shell used is
> /bin/sh which can be any shells, right?
> Are you sure the shell from the parent system is used? I could not
> find this documented anywhere.
> How do you explain that installing bash or adding a sh->dash symlink
> inside the chroot helps then?
> To Allan : did you find any scriptlets which actually worked without
> bash installed? Even the most basic scriptlet not doing anything does
> not work here.

In short, No.  But why am I getting no install scriptlet errors when I 
install all of base you might ask...  Well, that was doing my head in 
and here is the answer.  

Doing a "pamcan -r somedir -S base" installs the following programs who 
have install scriptlet (according to ABS) before bash:
    glibc,readline, db, pam, shadow

glibc, db and shadow do not use post_install so they do not test the 
need for bash.   However, both readline and pam do use post_install so 
it appears they are running. Why is that?  Because the package do not 
actually include the install script due to lack of install line in their 

All my tests with dummy packages with post_install scripts doing simple 
things like "return 0" or even nothing do not work unless bash is 
installed.  So it looks like we are really using the bash on the _child_ 
system, not the parent.  Which would make sense (how do you chroot to 
the child system and still access the parents bash?).


More information about the arch-dev-public mailing list