[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Installing debs in ~user/ or /usr/local?



On Sat, May 05, 2001 at 10:00:14PM +0200, Egon Willighagen wrote:
> Hi all,
> 
> maybe it is a stupid question, but can debian packages be installed in other 
> places than / ?

i was thinking about this myself. i suppose in theory it is possible,
and the data.tar.gz has all the files that are installed, relative to
the root. the other peice is the control.tar.gz, which contains all the
maintainer scripts. and other miscleneously.

the problems i see with non-root:
suid/sgid binaries would lose those bits, and some functions of
maintainer scripts would fail (such as update-menus and update-rc.d)
also, /var/lib/dpkg/status and friends could not be updated.

workaround: just extract the data.tar.gz where you want it.

dpkg-home () {
        [ "$1" ] || { echo "usage: $0 <deb_to_install.deb> [dir_to_install]"
                return 1 }
        ( cd ${2:-$HOME}
                ar p $1 data.tar.gz | tar xzf - )
}

-john



Reply to: