there is dpkg --instdir, from dpkg(1):
--instdir=dir
Change default installation directory which refers to the
direc‐
tory where packages are to be installed. instdir is
also the
directory passed to chroot(2) before running package's
installa‐
tion scripts, which means that the scripts see instdir as a
root
directory. (Defaults to /)
--root=dir
Changing root changes instdir to dir and
admindir to
dir/var/lib/dpkg.
the "chroot" part possibly means that you need to do extra "mount --bind /x
/opt/x" on x={proc,sys,dev,usr,lib,var,bin,sbin,...} in order for the
installation scripts to find everything they expect.
--Amos
On 21 December 2011 10:12, Peter Chubb <[email protected]> wrote:
> Hi folks,
> Under Debian, is there a simple way to install from .debs into
> /opt/package/
> instead of /?
>
> dpkg --root (or dpkg --instdir) is not quite what I want, as it
> assumes a complete root directory.
>
> (I know I can do dpkg -x and then move things around as I want, but
> is there a simpler way?)
>
> I want to do this with non-official .debs from emDebian, to install
> toolchains that can be nfs-exported to multiple machines.
> --
> Dr Peter Chubb http://www.gelato.unsw.edu.au peterc AT
> gelato.unsw.edu.au
> http://www.ertos.nicta.com.au ERTOS within National ICT
> Australia
> --
> SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
> Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
>
--
[image: View my profile on LinkedIn]
<http://www.linkedin.com/in/gliderflyer>
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html