On Sat, Jan 31, 2009 at 11:08 AM, Allan McRae <al...@archlinux.org> wrote: > Dan McGee wrote: >> >> On Sat, Jan 31, 2009 at 7:18 AM, Allan McRae <al...@archlinux.org> wrote: >> >>> >>> Thomas Bächler wrote: >>> >>>> >>>> Allan McRae schrieb: >>>> >>>> >>>>> >>>>> fakeroot >>>>> echo (coreutils) >>>>> >>>> >>>> echo is a shell builtin, /bin/echo will never be used. >>>> >>>> <snip> >>>> As I said, echo is a shell builtin, and unless we call /bin/echo >>>> explicitly, the builtin will be used (it's not only a builtin in bash, >>>> but >>>> also dash, so we should be fine). We could replace 'cat XYZ | command' >>>> with >>>> 'command < XYZ'. >>>> >>>> >>>>> >>>>> The install scripts for lilo and vi also fail if bash is not installed >>>>> (for some unknown reason). Lilo is just and old style "/bin/true" >>>>> script so >>>>> is easily fixed but I do not understand these two issues... >>>>> >>>> >>>> No idea here too, maybe one of the commands calls /bin/sh or so. Making >>>> lilo and vi depend on "sh" or so is okay IMO. >>>> >>> >>> The echo stuff is just as weird as what is happening with vi and lilo. >>> But >>> I can replicate the for errors the packages using echo with both >>> makchrootpkg and "pacman -Sr <root> pkg". Installing bash before these >>> packages fixes the issue (dash does not). Anyone know what is causing >>> this? >>> >> >> Yes- /bin/sh is a symlink to /bin/bash, in the bash package. dash >> cannot install this symlink as it would obviously conflict (although >> if Ubuntu can do it...). Pacman simply shells out to /bin/sh, so if >> you create the relevant symlink, things will just work with dash as >> well. >> > > OK, that explains why dash does not help, but why are those install scripts > failing? Are you saying that the system needs bash installed before it can > run post_install scripts? More directly to the issue, why do post_install > scripts with "echo" in them fail if bash is not installed when others seem > to run fine (or at least do not report an error)?
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?