LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Gentoo (http://www.linuxquestions.org/questions/gentoo-87/)
-   -   How to specify install directory to emerge (http://www.linuxquestions.org/questions/gentoo-87/how-to-specify-install-directory-to-emerge-4175411324/)

SiliconBadger 06-13-2012 10:14 PM

How to specify install directory to emerge
 
I have what seems to be a rather elementary request of emerge. I want to install certain packages in a non-standard directory.

"Well, why are you trying to do that?", you might ask. :)

In this case, I want to install Doom3 to /mnt/stripe which is where I mount my RAID 0 volume. I don't like waiting for long load times on games, so I want all those files stored on the fastest drive.

*Please* tell me that the portage paradigm permits me to specify my install directories, because after about 15 minutes of searching Google and scanning portage/emerge information, I don't see anything except a few threads with replies to other would-be-install-dir-changers arguing that they don't really want to do this.

P.S. I have seen the --root option, but it seems that this just sets the ROOT env variable, which does not seem like what I want to do at all.

i92guboj 06-14-2012 03:53 AM

The fact is that what you are trying to do is not *that* simple.

In other OSes, programs are installed into a more-or-less self-contained location. In Linux, UNIX, and other POSIX OSes, programs are installed across your fs. Each part goes into a given location.

This might not be true for DOOM3, though. But I don't have a way to know that because I don't own a license and, therefore, I can't install it, I presume.

One thing you can do/try, is,
  • Install it as usual.
  • Check where the big files are, those are the ones you are more concerned about, probably. If doom3 is like plain old doom, big files will be .wad (if my memory serves correctly from +15 years back in time.
  • Move those files to the new location, them symlink them (or the whole directory) to the apropiate place they were before, so the program can find them.

An alternate option is, if you know WHERE they will be installed, is to just mount -o bind the location. For example, let's say that the doom files go into /opt/doom3/. Taking into account that your fast drive is mounted under /mnt/stripe/ you should be able to do something like this BEFORE INSTALLING DOOM3:

Code:

# mkdir /mnt/stripe/doom3/
# mkdir /opt/doom3/
# mount -o bind /mnt/stripe/doom3 /opt/doom3

Use df or whatever you prefer to see if the thing is correct, and the free space in /opt/doom3 matches the free space in /mnt/stripe. If everything is ok, then install doom3 using the usual method, and modify your fstab file to make the change permanent.

If the directory where the big doom3 files reside is not /opt/doom3, change it accordingly!




PS. What you ask for is possible, but it doesn't work the way you think it works. If you set the portage root to, let's say, /mnt/stripe, then you would get a whole posix tree under that location. It might work for doom the same, if it's self-contained in the fashion of Windows programs, but generally speaking, this method is not used for your purpose, but to create build trees without a chroot, for example, to recompile the arm kernel for your mobile phone, and things like that. In any case, getting it to work, for your purpose or for any other, is not a trivial task.


All times are GMT -5. The time now is 12:44 PM.