I am planning to install some software on removable media (which will presumably always be present in the computer, though it's possible that there could be occasions where it is absent). After doing some research, I have seen three ways that seem to be preferable and also within my abilities:
Having the installed files on the removable media and bind mounting their folders into the proper locations
Having the installed files on the removable media and creating symlinks to the removable media; This could create a broken link if the media is removed. However, the media will usually be present and perhaps more importantly, there shouldn't be anything trying to access the folders other than the program (which wouldn't be run if the media is not present). For example, nothing should care if there is a broken link to the /var/lib/texmf folder of LaTeX.
If building from source is an option, using
./configure --prefix=/path/to/media/
(or possibly similarly,dpkg -i --force-not-root --root=/path/to/media package.deb
) Will there be issues with the programs not finding their dependencies which would be located on the system?
Are any of these methods obviously superior or inferior? Is there anything I'm missing? Are there any other comments?
EDIT: Most of the software I plan to install is for mathematics. The two primary programs are LaTeX and Sage. Since I had originally decided to attempt this, I realized that both of these programs can already be run locally (Sage, LaTeX) which kind of renders the point moot, but I'm still curious about the question (especially if "system integration", if you can call mounting/symlinking integrated, would work better), so I thought I would post it. I also thought I would give Mathematica a try, but wasn't sure if it would work due to licensing and such. MPI might be installed in the future; I guess mounting or compiling might be best to avoid a broken link.
/path/to/media/{bin|usr/local/bin|/usr/bin|/bin}
to your$PATH
.