Important: You are required to change your passwords used for Gentoo services and set an email address for your Wiki account if you haven't done so. See the full announcement and Wiki email policy change for more information.

Profile

From Gentoo Wiki
Jump to: navigation, search

A Portage profile specify default values for global and per-package USE flags and most variables of the /etc/portage/make.conf and define a set of system packages. Also it masks unstable package versions and USE flags. The profiles are maintained by the Gentoo developers as part of the Portage tree (/usr/portage/profiles), but there are ways for users to override single pieces.

Usage

List profiles

List the available profiles with eselect:

root # eselect profile list
Available profile symlink targets:
  [1]   default/linux/amd64/13.0 *
  [2]   default/linux/amd64/13.0/selinux
  [3]   default/linux/amd64/13.0/desktop
  [4]   default/linux/amd64/13.0/desktop/gnome
  [5]   default/linux/amd64/13.0/desktop/kde
  [6]   default/linux/amd64/13.0/developer
  [7]   default/linux/amd64/13.0/no-multilib
  [8]   default/linux/amd64/13.0/server
  [9]   hardened/linux/amd64
  ...

The "normal" profiles are the ones beginning with default, followed by subprofiles for kernel (linux or bsd), architecture (x86, amd64, etc.), release number (13.0) and target (desktop, server, developer, etc.). The desktop subprofile has also the subprofiles gnome and kde.

The arrow marks your currently active profile.

Change profile

Change your profile using eselect, e.g. for a KDE desktop:

root # eselect profile set 5

Structure

All profiles are cascading/stackable profiles composed by several subprofiles. Each subprofile (corresponding to a directory under /usr/portage/profiles) can contain files to set some defaults. Lower level subprofiles (e.g default/linux/amd64) also can have a file called parent, which pulls in one or more other higher level subprofiles (here: default/linux, arch/amd64 and base). Defaults defined in a lower level subprofile profile overwrites all conflicting defaults in higher subprofiles.

Following is an example for the stacked profile default/linux/amd64/13.0/desktop/kde showing the dependencies.

Code

/usr/portage/profiles/
|-- arch
|   |-- amd64 <--------------.
|   |   `-- parent >-------- | ----------------------.
|   -- base <--------------- | ----------------------|
|-- base <-------------------|                       |
|-- default                  |                       |
|   `-- linux <--------------|                       |
|       `-- amd64 <--------- | ------------------.   |
|           |-- parent >-----'                   |   |
|           `-- 13.0 <-----------------------.   |   |
|               |-- parent >---------------- | --|   |
|               `-- desktop <------------.   |   |   |
|                   |-- parent >-------- | --|   |   |
|                   `-- kde              |   |   |   |
|                       `-- parent >-----|   |   |   |
|-- features                             |   |   |   |
|   `-- multilib <-----------.           |   |   |   |
|       `-- lib32 <--------- | --------- | - | - | --'
|           `-- parent >-----'           |   |   |
|-- releases <-----------.               |   |   |
|   `-- 13.0 <---------- | ------------- | - | --'
|       `-- parent >-----'               |   |
`-- targets                              |   |
    `-- desktop <----------------------- | --'
        `--kde <----------- | -----------'
           `-- parent >-----'

The following table gives a quick overview of what subprofile contain what files:

  root
folder
arch
-amd64
arch
-base
base default
-linux
default
-linux
-amd64
default
-linux
-amd64
-13.0
default
-linux
-amd64
-13.0
-desktop
default
-linux
-amd64
-13.0
-desktop
-kde
features
-multilib
features
-multilib
-lib32
releases releases
-13.0
targets
-desktop
targets
-desktop
-kde
eapi Yes No No No No No Yes Yes Yes No No No Yes No No
make.defaults No Yes No Yes Yes No No No No Yes Yes Yes Yes Yes Yes
packages No No No Yes Yes No No No No No No No No No No
package.build No No No No Yes No No No No No No No No No No
package.mask Yes No No Yes No No No No No No No No Yes No No
package.use No No No Yes Yes No No No No No No No No Yes Yes
package.use.force No Yes No Yes No No No No No No No No No No No
package.use.mask No Yes No Yes Yes No No No No No No No No No No
profile.bashrc No No No Yes No No No No No No No No No No No
use.force No Yes No Yes No No No No No Yes No No No No Yes
use.mask No Yes Yes Yes No No No No No Yes No No No No No