/etc/portage/package.env

/etc/portage/env and /etc/portage/package.env are used for modifying environmental variables, such as those in make.conf, on a per-package basis.


 * The  directory contains files that have the same syntax as  . The filename will be used as the key to override settings.
 * The  file describes which of these files will be used on a per-package basis.

Example 1: Enable debug information for a specific package
Suppose you would like to build GIMP with debug information because you are using a development version and you would like to report any crashes. Create a file in /etc/portage/env that contains the desired changes: /etc/portage/env/debug.conf

Next, add an entry to package.env followed by the name of the file you created: /etc/portage/package.env

Example 2: Build certain packages in a different location
Suppose your portage build directory is in tmpfs, but some packages are too large, and run out of space. You can modify PORTAGE_TMPDIR for those packages.

Create an env file that modifies PORTAGE_TMPDIR and sets it to an on-disk directory: /etc/portage/env/no-tmpfs.conf

Add large packages to package.env: /etc/portage/package.env Notice that it's possible to reference several env files for each package. (Tip originally blogged by Jeremy Olexa)