LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo
User Name
Password
Gentoo This forum is for the discussion of Gentoo Linux.

Notices


Reply
  Search this Thread
Old 06-13-2012, 09:14 PM   #1
SiliconBadger
Member
 
Registered: May 2002
Location: Houston
Distribution: Gentoo
Posts: 32

Rep: Reputation: 15
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.
 
Old 06-14-2012, 02:53 AM   #2
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
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.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] install grub without emerge gujedan Gentoo 1 05-29-2011 08:19 AM
[SOLVED] cant emerge samba : Failed to emerge sys-libs/tdb-1.2.1 Adol Gentoo 2 03-09-2011 11:51 AM
python: can't open file 'emerge\bin\emerge.py' Virtuality Programming 5 01-30-2008 01:23 PM
emerge fails while trying to install ghostscript ub3rj3phf Linux - Software 2 03-19-2007 03:10 PM
gentoo install emerge fetch errors? chunlee Linux - Distributions 6 12-17-2004 11:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo

All times are GMT -5. The time now is 10:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration