[arch-dev-public] install scripts in core
allan at archlinux.org
Tue Feb 3 10:57:20 EST 2009
Allan McRae wrote:
> 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
>> 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 PKGBUILD.
> 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?).
And here is my plan to fix this.
- Remove the post_install script from readline - it is installed before
tex-info anyway due to readline -> bash -> gzip -> tex-info. I'd give
texinfo a dep on 'sh' in case the bash->gzip link ever breaks.
- All packages (at least in core) with an install script must depend on
'sh' and programs needed to run their install script functions (see
start of thread).
We run into a problem if any dep of bash needs a pre/post_install.
These packages currently are kernel-headers, tzdata, glibc, ncurses, and
readline. Now wait for Dan to point out that dash has no deps so could
be our default sh... which is why I suggest depending on 'sh' rather
More information about the arch-dev-public