PDA

View Full Version : Dpkg default directory



dvryknopper
02-13-2006, 09:46 PM
Where is the default directory installed packages go if you use dpkg to install them, I assume it would be the home directory which is in the ram disk, but I want to be sure, just to be safe because I am not planning on installing on a persistant drive, I just want experience with installing a package and proof of concept

angor
02-14-2006, 07:56 AM
I have not tried this myself, but I think this could be the way to go:

dpkg -x /path/to/pkg.deb /some/directory # eXtract contents to /some/directory
DESTDIR=/some/directory
export MANPATH=$DESTDIR/man:$DESTDIR/usr/share/man:$MANPATH
export PATH=$DESTDIR/bin:$DESTDIR/usr/bin:$PATH #ok, sbin too, perhaps
export LD_LIBRARY_PATH=$DESTDIR/lib:$DESTDIR/usr/lib:$LD_LIBRARY_PATH

dvryknopper
02-21-2006, 04:58 AM
Thanks for the reply, but before I give it a try, one question the shell variables that you are exporting to be global, how does knoppix use those variables to extablish a man page link and the ability to open the application from the terminal, I'm a little rusty with how shell variables work :oops:

angor
02-21-2006, 09:22 AM
This has nothing to do with knoppix, it's just that the shell (bash, usually)
looks for these variables in order to know where to look for executables,
man pages, and libraries. The variables have to be "exported" so they will
be part of the environment that gets copied to children processes.

(And, to complete this mini-lesson, that is why a child process cannot hand
a changed variable back to its parent process: this is only a copy that gets
dropped when the child finishes.)