Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 233761 - Give portage alternate build directories on a per-ebuild basis
Summary: Give portage alternate build directories on a per-ebuild basis
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Conceptual/Abstract Ideas (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-03 00:59 UTC by sam logen
Modified: 2008-08-03 08:51 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sam logen 2008-08-03 00:59:27 UTC
Hi.  I've no idea if this has been implemented or not.  If it has, sorry for not researching in-depth enough.  Anyway, here's my idea.  Many people today have desktop systems with an excess of a gigabyte of memory installed.  I've seen posts of people using some of this memory with tmpfs to create virtual directories that only use ram space.  A lot of gentoo users find that using emerge to build their software directly in the ram tmpfs environment significantly speeds up compilation time (heresay - I have not tested this).  The only problem is with software that consumes a tremendous amount of space (openoffice, etc.).

Portage should be able to estimate the amount of space a compilation will take, or at least determine the size of the source after unpacking.  So the user can specify a different directory in eg. "/etc/make.conf".  The specified directory can be for compilations that will take up a small (user defined) amount of space.  This can be tmpfs directory, and the max size of the directory can also be specified in make.conf, so that packages that will potentially exceed this size will be built in the default directory on the hard drive.

I know that the size of source code has little to do with the size of compiled code, so I can't think how portage would make these determinations on its own.  Portage could fall back to the default directory if it runs out of space in the tmpfs directory, but that would increase compilation time for that ebuild.

I'd appreciate any feedback on this,
Sam

Reproducible: Didn't try

Steps to Reproduce:



Expected Results:  
Faster ebuild compilations for compilations that will fit in the tmpfs directory.
Comment 1 Andrew Gaffney (RETIRED) gentoo-dev 2008-08-03 01:02:05 UTC
You can probably accomplish this with bashrc, but I'm not sure. Anyway, I'd think this is slightly beyond portage's scope.
Comment 2 Zac Medico gentoo-dev 2008-08-03 04:19:53 UTC
I don't think this can really be handled cleanly in portage. It would probably be much cleaner to use some type of union filesystem, like unionfs, with support for directing writes to whichever underlying filesystem happens to have some space left.
Comment 3 sam logen 2008-08-03 06:35:07 UTC
Thanks for the hints.  I was just brainstorming things while multitasking, and thought I'd pass this little fractured gem along.

Sam
Comment 4 Fabian Groffen gentoo-dev 2008-08-03 08:51:28 UTC
Sounds like fusefs on mmapped blocks.  The kernel does the rest (theory and practise differ here).