Re: Can I use dpkg -i to install in /usr/local or /opt?
On Tue, Sep 26, 2000 at 04:18:05AM -0400, Dale Scheetz wrote:
> The .deb files are just ar archives. You can always extract the data
> component and untar it anywhere you have write permissions. A fairly
> simple script could automate the process for you, but dpkg isn't the tool
> you are looking for, as it is intended to only let you do the right thing.
> No, I'm not saying you want to do something wrong, only that it is outside
> the scope of dpkg, and can be done without resorting to the package tools.
Dale, I know, that I can extract .deb files using ar and tar,
but that is not what I want. I think dpkg is the right tool
to do this, because
1. pre/post-rm/inst scripts are executed
2. it has this great database, that makes it possible to use
dpkg -l/-L/-s etc, where I have dependencies and all that
makes Debian such a great system.
Maybe I should propose an enhancement to dpkg (and also a change
to the policy for writing the scripts in point [1.] above) to
allow non-root installation. One possible interface could be
dpkg --prefix=/usr/local (or /home/somebody or /opt) and the
scripts inherit the environment variable DPKG_PREFIX from
dpkg. In the actual prerm script one has to write, e.g.
install-info --quiet --remove $DPKG_PREFIX/info/foobar.info.gz
Of course, the dpkg database for packages under /usr/local
has to be in /var/local/lib/dpkg or so (maybe dpkg
--database=/var/local/dpkg), because a locally
installed package should not be visible to the "global" system.
What I mean is, that "local" depends on "global" are OK,
but not the other way around.
I don't know, what we have to do to allow non-root users to
install packages in areas where they have write access to.
Just an idea, but I think a useful one. Also for people
who want to install e.g. gnome 1.0.56 in /usr, and helix
gnome 1.x.y in /usr/local or similar experiments.
W. Borgert <email@example.com>