Re: Problem with --instdir and pre/postinst scripts
Bjoern Stierand wrote:
> root@grobi:build> dpkg --instdir=/home/foo/ -i mypackage.deb
> Has anyone an idea how to solve this one? I read in the dpkg
> manpage that it uses chroot when installing the package,
> could this problem be related to the chroot thing (maybe it
> doesn't find a shell then or something like that).
Yes, if you do dpkg --instdir=/home/foo then you need a chroot environment
in /home/foo. If there is not a working /home/foo/bin/sh, for example,
maintainer scripts (preinst, postinst, etc.) will not work.
If you want to create a chroot environment, the debootstrap tool may
help, but perhaps installing packages in alternate roots (which is
what --instdir means, more or less) is not what you were looking for.