View previous topic :: View next topic |
Author |
Message |
abduct Apprentice
Joined: 19 Mar 2015 Posts: 215
|
Posted: Tue Apr 24, 2018 2:43 am Post subject: Temporally build package in another location/partition |
|
|
So I need to emerge some packages that may have large space requirements for building (clang and llvm specifically). I have very little space, more or less around 1GB. I have a partition mounted that has 4.3GB.
I am wondering if there is a way to let emerge build clang and llvm in another location (the 4.3GB partition) and then move the compiled binaries into it's normal installation location.
I've seen the `PORTAGE_TMPDIR' environment variable from `man 5 make.conf' Is this what I need to set? If so do I need to set it inside make.conf or can I inline it into the emerge command such as
Code: | PORTAGE_TMPDIR=/mount/point emerge -a clang |
Also is it possible to find how much space is required for building packages? Even if it is only a estimate.
Thanks |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9679 Location: almost Mile High in the USA
|
Posted: Tue Apr 24, 2018 6:42 am Post subject: |
|
|
Yes this should work. I normally edit my make.conf and point PORTAGE_TMPDIR always point to a disk with space on it or a tmpfs. Same goes for PORTDIR to keep the tree somewhere else too possibly.
However at 1GB remaining, you're going to be in a lot of hurt soon, (installed) packages tend to continue to increase in size... _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Tue Apr 24, 2018 9:16 am Post subject: |
|
|
abduct,
You can set PORTAGE_TMPDIR on a per package basis. Then you won't forget.
See how to use /etc/portage/package.env and /etc/portage/env/ in
Hint: describe what is to be done in files in /etc/portage/env/ and the packages it applies to in /etc/portage/package.env _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
wraeth Developer
Joined: 08 May 2007 Posts: 72 Location: Australia
|
Posted: Tue Apr 24, 2018 10:53 am Post subject: |
|
|
As for checking how much space a package will require to build, the only way is to actually build the package. Packages could do something as simple as copy the extracted distfiles into their install location, or dump an arbitrary string to a file up to whatever length it likes.
Some of the bigger packages do have a check in place prior to building to ensure enough space - as estimated by the maintainer - is available in the designated PORTAGE_TMPDIR. |
|
Back to top |
|
|
freke l33t
Joined: 23 Jan 2003 Posts: 977 Location: Somewhere in Denmark
|
Posted: Tue Apr 24, 2018 3:14 pm Post subject: |
|
|
I'm using a tmpfs for /var/tmp/portage
/etc/fstab Code: | ...
tmpfs /var/tmp/portage tmpfs size=2G,uid=portage,gid=portage,mode=775,noatime 0 0
... |
And then for some of the bigger builds:
/etc/portage/env/notmpfs.conf
Code: | PORTAGE_TMPDIR="/var/tmp/notmpfs" |
and
/etc/portage/package.env
Code: | ## No tmpfs
dev-db/mariadb notmpfs.conf
sys-devel/gcc notmpfs.conf |
|
|
Back to top |
|
|
|