.TH "PORTAGE" "5" "Sep 2012" "Portage VERSION" "Portage" .SH NAME portage \- the heart of Gentoo .SH "DESCRIPTION" The current portage code uses many different configuration files, most of which are unknown to users and normal developers. Here we will try to collect all the odds and ends so as to help users more effectively utilize portage. This is a reference only for files which do not already have a man page. All files in the make.profile directory may be tweaked via parent profiles when using cascading profiles. For more info, please see http://www.gentoo.org/proj/en/releng/docs/cascading-profiles.xml .IP Note: If you are looking for information on how to emerge something, please see .BR emerge (1). .SH "SYNOPSIS" .TP .BR /etc/ .nf .BR make.conf (5) .fi .TP \fB/etc/portage/make.profile/\fR or \fB/etc/make.profile/\fR site\-specific overrides go in \fB/etc/portage/profile/\fR .nf deprecated eapi make.defaults packages packages.build package.accept_keywords package.keywords package.mask package.provided package.unmask package.use package.use.force package.use.mask package.use.stable.force package.use.stable.mask parent profile.bashrc use.force use.mask use.stable.mask use.stable.force virtuals .fi .TP .BR /etc/portage/ .nf bashrc categories color.map license_groups make.conf mirrors modules package.accept_keywords package.env package.keywords package.license package.mask package.properties package.unmask package.use repos.conf .fi .TP .BR /etc/portage/env/ package-specific bashrc files .TP .BR /etc/portage/profile/ site-specific overrides of \fB/etc/portage/make.profile/\fR .TP .BR /etc/portage/sets/ user\-defined package sets .TP .BR /usr/portage/metadata/ .nf layout.conf .fi .TP .BR /usr/portage/profiles/ .nf arch.list categories info_pkgs info_vars license_groups make.defaults package.mask package.unmask package.use package.use.force package.use.mask package.use.stable.force package.use.stable.mask profiles.desc repo_name thirdpartymirrors use.desc use.force use.local.desc use.mask use.stable.mask use.stable.force .fi .TP .BR /usr/share/portage/config/ .nf make.globals .fi .TP .BR /var/cache/edb/ misc internal cache files .TP .BR /var/db/pkg/ database to track installed packages .TP .BR /var/lib/portage/ .nf config world world_sets .fi .SH "GLOSSARY" In the following sections, some terminology may be foreign to you or used with meaning specific to Portage. Please see the referenced manpages for more detailed explanations. .RS .TP .B DEPEND atom An atom is either of the form category/package or consists of an operator followed by category/package followed by a hyphen and a version specification. An atom might be suffixed by a slot specification. .br More reading: .BR ebuild (5) .B Extended Atom Syntax .br The following atom syntax extensions are only supported in user configuration files and command line arguments for programs such as \fBemerge(1)\fR: .RS .TP .B Repository Constraints Atoms with repository constraints have a '::' separator appended to the right side, followed by a repository name. Each repository name should correspond to the value of a \fBrepo_name\fR entry from one of the repositories that is configured via the \fBPORTDIR\fR or \fBPORTDIR_OVERLAY\fR variables (see \fBmake.conf\fR(5)). .I Examples: .nf # match sed from the 'gentoo' repository sys\-apps/sed::gentoo # match kdelibs from the 'kde\-testing' repository kde\-base/kdelibs::kde\-testing # match empathy from the 'gnome' repository net\-im/empathy::gnome .fi .TP .B Wildcard Patterns Atoms containing wildcard patterns are of the form category/package, where the special '*' wildcard character substitutes for an arbitrary number of normal characters. More than one '*' character is allowed, but not two next to each other. .I Examples: .nf # match anything with a version containing 9999, which can be used in # package.mask to prevent emerge --autounmask from selecting live ebuilds =*/*-*9999* # match anything from the 'sys\-apps' category sys\-apps/* # match packages named 'zlib' from any category */zlib # match any package from a category that begins with 'net\-' net\-*/* # match any package name from any category */* # match any package from the 'gentoo' repository */*::gentoo .fi .RE .TP .B KEYWORD Each architecture has a unique KEYWORD. .br More reading: .BR ebuild (5) .TP .B virtual A DEPEND atom that is part of the "virtual" category. They are used when different packages can satisfy a dependency and only one of them is needed. .br More reading: .BR ebuild (5) .RE .SH "SPECIFIC FILE DESCRIPTIONS" .TP .BR /etc/ .RS .TP .BR make.conf The global custom settings for Portage. See \fBmake.conf\fR(5). .RE .TP \fB/etc/portage/make.profile/\fR or \fB/etc/make.profile/\fR This is usually just a symlink to the correct profile in \fB/usr/portage/profiles/\fR. Since it is part of the portage tree, it may easily be updated/regenerated by running `emerge \-\-sync`. It defines what a profile is (usually arch specific stuff). If you need a custom profile, then you should make your own \fBmake.profile\fR directory and populate it. However, if you just wish to override some settings, use \fB/etc/portage/profile/\fR (it supports all of the same file types that \fBmake.profile\fR does, except parent). Do NOT edit the settings in \fBmake.profile\fR because they WILL be lost with the next `emerge \-\-sync`. If both \fB/etc/portage/make.profile/\fR and \fB/etc/make.profile/\fR exist, then \fB/etc/portage/make.profile/\fR will be preferred. Any file in this directory, directories of other profiles or top-level "profiles" directory that begins with "package." or "use." can be more than just a flat file. If it is a directory, then all the files in that directory will be sorted in ascending alphabetical order by file name and summed together as if it were a single file. Note that this behavior is only supported since portage-2.1.6.7, and it is not included in PMS at this time. .I Example: .nf ${PORTDIR}/profiles/package.mask/removals ${PORTDIR}/profiles/package.mask/testing .fi .RS .TP .BR deprecated The existence of this file marks a profile as deprecated, meaning it is not supported by Gentoo anymore. The first line must be the profile to which users are encouraged to upgrade, optionally followed by some instructions explaining how they can upgrade. .I Example: .nf default-linux/x86/2005.0 # emerge -n '>=sys-apps/portage-2.0.51' # rm -f /etc/portage/make.profile # ln -s /usr/portage/profiles/default-linux/alpha/2005.0 /etc/portage/make.profile .fi .TP .BR eapi The first line of this file specifies the \fBEAPI\fR to which files in the same directory conform. See \fBebuild\fR(5) for information about \fBEAPI\fR and related features. Beginning with \fBEAPI 5\fR, new USE configuration files are supported: use.stable.mask, use.stable.force, package.use.stable.mask and package.use.stable.force. These files behave similarly to previously supported USE configuration files, except that they only influence packages that are merged due to a stable keyword. .TP .BR make.defaults The profile default settings for Portage. The general format is described in \fBmake.conf\fR(5). The \fImake.defaults\fR for your profile defines a few specific variables too: .PD 0 .RS .TP .BR ARCH Architecture type (x86/ppc/hppa/etc...). .TP \fBIUSE_IMPLICIT\fR = \fI[space delimited list of USE flags]\fR Defines implicit \fBIUSE\fR for ebuilds using \fBEAPI 5\fR or later. Flags that come from \fBUSE_EXPAND\fR or \fBUSE_EXPAND_UNPREFIXED\fR variables do not belong in \fBIUSE_IMPLICIT\fR, since \fBUSE_EXPAND_VALUES_*\fR variables are used to define implicit \fBIUSE\fR for those flags. See \fBebuild\fR(5) for more information about \fBIUSE\fR. .TP .B USERLAND = \fI"GNU"\fR Support BSD/cygwin/etc... .TP \fBUSE_EXPAND\fR = \fI[space delimited list of variable names]\fR Any variable listed here will be used to augment USE by inserting a new flag for every value in that variable, so USE_EXPAND="FOO" and FOO="bar bla" results in USE="foo_bar foo_bla". .TP \fBUSE_EXPAND_HIDDEN\fR = \fI[space delimited list of variable names]\fR Names of \fBUSE_EXPAND\fR variables that should not be shown in the verbose merge list output of the \fBemerge\fR(1) command. .TP \fBUSE_EXPAND_IMPLICIT\fR = \fI[space delimited list of variable names]\fR Defines \fBUSE_EXPAND\fR and \fBUSE_EXPAND_UNPREFIXED\fR variables for which the corresponding USE flags may have implicit \fBIUSE\fR for ebuilds using \fBEAPI 5\fR or later. .TP \fBUSE_EXPAND_UNPREFIXED\fR = \fI[space delimited list of variable names]\fR Any variable listed here will be used to augment USE by inserting a new flag for every value in that variable, so USE_EXPAND_UNPREFIXED="FOO" and FOO="bar bla" results in USE="bar bla". .TP \fBUSE_EXPAND_VALUES_ARCH\fR = \fI[space delimited list of ARCH values]\fR Defines ARCH values used to generate implicit \fBIUSE\fR for ebuilds using \fBEAPI 5\fR or later. .TP \fBUSE_EXPAND_VALUES_ELIBC\fR = \fI[space delimited list of ELIBC values]\fR Defines ELIBC values used to generate implicit \fBIUSE\fR for ebuilds using \fBEAPI 5\fR or later. .TP \fBUSE_EXPAND_VALUES_KERNEL\fR = \fI[space delimited list of KERNEL values]\fR Defines KERNEL values used to generate implicit \fBIUSE\fR for ebuilds using \fBEAPI 5\fR or later. .TP \fBUSE_EXPAND_VALUES_USERLAND\fR = \fI[space delimited list of USERLAND values]\fR Defines USERLAND values used to generate implicit \fBIUSE\fR for ebuilds using \fBEAPI 5\fR or later. .TP .B ELIBC = \fI"glibc"\fR Support uClibc/BSD libc/etc... .TP .B PROFILE_ONLY_VARIABLES = \fI"ARCH"\fR Prevent critical variables from being changed by the user in make.conf or the env. .TP .BR PROFILE_ARCH Distinguish machines classes that have the same \fBARCH\fR. All sparc machines have ARCH=sparc but set this to either 'sparc32' or 'sparc64'. .TP .BR BOOTSTRAP_USE Special USE flags which may be needed when bootstrapping from stage1 to stage2. .RE .PD 1 .TP .BR packages Provides the list of packages that compose the special \fIsystem\fR set. .I Format: .nf \- comments begin with # (no inline comments) \- one DEPEND atom per line \- packages to be added to the system set begin with a * \- atoms without * only appear for legacy reasons .fi .I Note: In a cascading profile setup, you can remove packages in children profiles which were added by parent profiles by prefixing the atom with a '\-'. .I Example: .nf # i am a comment ! # pull in a version of glibc less than 2.3 *=media\-video/nvidia\-kernel\-1.0.4496 >=media\-video/nvidia\-glx\-1.0.4496 .fi .TP .BR package.properties This will allow ACCEPT_PROPERTIES to be augmented for a single package. .I Format: .nf \- comment lines begin with # (no inline comments) \- one DEPEND atom per line followed by additional properties .fi .TP .BR package.unmask Just like package.mask above, except here you list packages you want to unmask. Useful for overriding the global package.mask file (see above). Note that this does not override packages that are masked via KEYWORDS. .TP .BR package.use Per\-package USE flags. Useful for tracking local USE flags or for enabling USE flags for certain packages only. Perhaps you develop GTK and thus you want documentation for it, but you don't want documentation for QT. Easy as pie my friend! .I Format: .nf \- comments begin with # (no inline comments) \- one DEPEND atom per line with space-delimited USE flags .fi .I Example: .nf # turn on docs for GTK 2.x =x11\-libs/gtk+\-2* doc # disable mysql support for QT x11\-libs/qt \-mysql .fi .TP .BR repos.conf Specifies \fIsite\-specific\fR repository configuration information. Note that configuration settings which are specified here do not apply to tools such as \fBrepoman\fR(1) and \fBegencache\fR(1), since operations performed by these tools are inherently \fBnot\fR \fIsite\-specific\fR. \fBWARNING:\fR Use of \fBrepos.conf\fR is generally not recommended since resulting changes in eclass inheritance (especially due to \fBeclass\-overrides\fR) may trigger performance issues under some circumstances (see \fBbug #124041\fR). When using \fBeclass\-overrides\fR, due to bug #276264, you must ensure that your portage tree does not contain a metadata/cache/ directory. If that directory exists then you should remove it entirely, and set PORTAGE_RSYNC_EXTRA_OPTS="\-\-exclude=/metadata/cache" in make.conf in order to exclude the metadata/cache/ directory during \fBemerge\fR(1) \-\-sync operations. .I Example: .nf [DEFAULT] # make all repositories inherit eclasses from the java\-overlay and # java\-experimental repositories, with eclasses from java\-experimental # taking precedence over those from java\-overlay eclass\-overrides = java\-overlay java\-experimental [gentoo] # disable all eclass overrides for ebuilds from the gentoo repository eclass\-overrides = # when processing metadata/layout.conf from other repositories, substitute # 'gentoo' in place of references to repositories named 'foo' and 'bar', # and discard the 'baz' alias contained in gentoo's layout.conf aliases = foo bar -baz [kde-testing] # override the metadata/layout.conf masters setting from the kde-testing repo masters = gentoo kde [python] # override the metadata/layout.conf masters setting from the python repo, # so that settings won't be inherited from those masters, and so that # those master repos won't be required as dependencies (the user must # ensure that any required dependencies such as eclasses are satisfied) masters = .fi .RE .TP .BR /etc/portage/env/ .RS In this directory additional package\-specific bashrc files can be created. Note that if package\-specific environment variable settings are all that's needed, then \fB/etc/portage/package.env\fR should be used instead of the bashrc approach that is described here. Also note that special variables such as \fBFEATURES\fR and \fBINSTALL_MASK\fR will not produce the intended results if they are set in bashrc, and therefore \fB/etc/portage/package.env\fR should be used instead. Portage will source all of these bashrc files after \fB/etc/portage/bashrc\fR in the following order: .nr step 1 1 .IP \n[step]. 3 /etc/portage/env/${CATEGORY}/${PN} .IP \n+[step]. /etc/portage/env/${CATEGORY}/${PN}:${SLOT} .IP \n+[step]. /etc/portage/env/${CATEGORY}/${P} .IP \n+[step]. /etc/portage/env/${CATEGORY}/${PF} .RE .TP .BR /etc/portage/sets/ .RS For each file in this directory, a package set is created with its name corresponding to the name of the file. Each file should contain a list of package atoms and nested package sets, one per line. When a package set is referenced as an \fBemerge\fR(1) argument or when it is referenced as a nested package set (inside of another package set), the set name is prefixed with \fB@\fR. Also see \fB/var/lib/portage/world_sets\fR and the \fBemerge\fR(1) \fB\-\-list\-sets\fR option. .RE .TP .BR /usr/portage/metadata/ .RS .TP .BR layout.conf Specifies information about the repository layout. A "masters" attribute is supported, which is used to specify names of repositories which satisfy dependencies on eclasses and/or ebuilds. Each repository name should correspond the value of a \fBrepo_name\fR entry from one of the repositories that is configured via the \fBPORTDIR\fR or \fBPORTDIR_OVERLAY\fR variables (see \fBmake.conf\fR(5)). Repositories listed toward the right of the \fBmasters\fR list take precedence over those listed toward the left of the list. An "aliases" attribute is also supported, which behaves like an "aliases" attribute in \fBrepos.conf\fR. \fISite-specific\fR overrides to \fBlayout.conf\fR settings may be specified in \fB/etc/portage/repos.conf\fR. Settings in \fBrepos.conf\fR take precedence over settings in \fBlayout.conf\fR, except tools such as \fBrepoman\fR(1) and \fBegencache\fR(1) will entirely ignore \fBrepos.conf\fR since their operations are inherently \fBnot\fR \fIsite\-specific\fR. .I Example: .nf # eclasses provided by java-overlay take precedence over identically named # eclasses that are provided by gentoo masters = gentoo java-overlay # indicate that this repo can be used as a substitute for foo-overlay aliases = foo-overlay # sign commits in this repo, which requires Git >=1.7.9, and # key configured by `git config user.signingkey key_id` sign\-commits = true # do not sign manifests in this repo sign\-manifests = false # thin\-manifests only contain DIST entries thin\-manifests = true # indicate that this repo requires manifests for each package, and is # considered a failure if a manifest file is missing/incorrect use\-manifests = strict # customize the set of hashes generated for Manifest entries manifest\-hashes = SHA256 SHA512 WHIRLPOOL # indicate that this repo enables repoman's --echangelog=y option automatically update\-changelog = true # indicate that this repo contains both md5-dict and pms cache formats, # which may be generated by egencache(1) cache\-formats = md5-dict pms # indicate that this repo contains profiles that may use directories for # package.mask, package.provided, package.use, package.use.force, # package.use.mask, package.use.stable.force, package.use.stable.mask, # use.force, use.mask, use.stable.force, and use.stable.mask. # profile\-formats = portage-1 # indicate that paths such as 'gentoo:targets/desktop' or ':targets/desktop' in # profile parent files can be used to express paths relative to the root # 'profiles' directory of a repository (when the repo name is omitted before # the colon, it refers to the current repository the parent file is inside) profile\-formats = portage-2 .fi .RE .TP .BR /usr/portage/profiles/ Global Gentoo settings that are controlled by the developers. To override these settings, you can use the files in \fB/etc/portage/\fR. .RS .TP .BR arch.list A list of all valid KEYWORDS. This does not include modifiers. .I Format: .nf \- one KEYWORD per line .fi .I Example: .nf x86 ppc sparc .fi .TP .BR categories A simple list of valid categories that may be used in /usr/portage, PORTDIR_OVERLAY, and PKGDIR (see \fBmake.conf\fR(5)). .I Format: .nf \- one category per line .fi .I Example: .nf app\-admin dev\-lang games\-strategy sys\-kernel .fi .TP .BR info_pkgs A list of all the packages which will be displayed when you run `emerge info`. .TP .BR info_vars A list of all the variables which will be displayed when you run `emerge info`. .TP .BR license_groups This contains groups of licenses that may be specifed in the \fBACCEPT_LICENSE\fR variable (see \fBmake.conf\fR(5)). Refer to GLEP 23 for further information: \fIhttp://www.gentoo.org/proj/en/glep/glep-0023.html\fR. .I Format: .nf \- comments begin with # (no inline comments) \- one group name, followed by list of licenses and nested groups \- nested groups are prefixed with the '@' symbol .fi .I Example: .nf # The FSF-APPROVED group includes the entire GPL-COMPATIBLE group and more. FSF-APPROVED @GPL-COMPATIBLE Apache-1.1 BSD-4 MPL-1.0 MPL-1.1 # The GPL-COMPATIBLE group includes all licenses compatible with the GNU GPL. GPL-COMPATIBLE Apache-2.0 BSD BSD-2 GPL-2 GPL-3 LGPL-2.1 LGPL-3 X11 ZLIB .fi .TP .BR package.accept_keywords Per\-package ACCEPT_KEYWORDS for profiles. This has the same format and behavior as /etc/portage/package.accept_keywords, including the ability to list atoms without any keywords in order to accept unstable variants of all stable keywords listed in ACCEPT_KEYWORDS. .TP .BR package.keywords Per\-profile KEYWORDS. Useful for cases in which the effective KEYWORDS of a given package should vary depending on which profile the user has selected. .I Format: .nf \- comment lines begin with # (no inline comments) \- one DEPEND atom per line followed by additional KEYWORDS .fi .I Example: .nf # add stable keyword to libgd media\-libs/libgd x86 # remove stable keyword from mplayer and add unstable keyword media\-video/mplayer \-x86 ~x86 # remove all keywords from netcat net-analyzer/netcat -* .fi .TP .BR package.mask This contains a list of DEPEND atoms for packages that should not be installed in any profile. Useful for adding the latest KDE betas and making sure no one accidentally upgrades to them. Also useful for quickly masking specific versions due to security issues. ALWAYS include a comment explaining WHY the package has been masked and WHO is doing the masking. .I Format: .nf \- comments begin with # (no inline comments) \- one DEPEND atom per line .fi .I Example: .nf # masked for security reasons (10 Sep 2003) # new kde betas =kde\-base/kde\-3.2.0_beta1 =kde\-base/kdeaccessibility\-3.2.0_beta1 .fi .TP .BR profiles.desc List all the current stable and development profiles. If a profile is listed here, then it will be checked by repoman. .I Format: .nf \- comments begin with # (no inline comments) \- one profile list per line in format: arch dir status \- arch must be listed in arch.list \- dir is relative to profiles.desc \- status must be 'stable', 'dev', or 'exp' .fi .I Example: .nf alpha default/linux/alpha/10.0 stable m68k default/linux/m68k/10.0 dev x86 default/linux/x86/10.0 stable x86-linux prefix/linux/x86 exp .fi .TP .BR repo_name The first line of the file should define a unique repository name. The name may contain any of the characters [A\-Za\-z0\-9_\-]. It must not begin with a hyphen. .TP .BR thirdpartymirrors Controls the mapping of mirror:// style URIs to actual lists of mirrors. Keeps us from overloading a single server. .I Format: .nf \- comments begin with # (no inline comments) \- mirror type followed by a list of hosts .fi .I Example: .nf sourceforge http://aleron.dl.sourceforge.net/sourceforge http://unc.dl.sourceforge.net/sourceforge gentoo http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/ ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo/distfiles kernel http://www.kernel.org/pub http://www.us.kernel.org/pub .fi .TP .BR use.desc All global USE flags must be listed here with a description of what they do. .I Format: .nf \- comments begin with # (no inline comments) \- use flag \- some description .fi .I Example: .nf 3dfx \- Adds support for 3dfx video cards acl \- Adds support for Access Control Lists doc \- Adds extra documentation .fi .TP .BR use.local.desc All local USE flags are listed here along with the package and a description. This file is automatically generated from the metadata.xml files that are included with each individual package. Refer to GLEP 56 for further information: \fIhttp://www.gentoo.org/proj/en/glep/glep-0056.html\fR. .nf .I Format: \- comments begin with # (no inline comments) \- package:use flag \- description .I Example: app\-editors/nano:justify \- Toggles the justify option dev\-libs/DirectFB:fusion \- Adds Multi Application support games\-emulation/xmess:net \- Adds network support .fi .RE .TP .BR /usr/share/portage/config/ .RS .TP .BR make.globals The global default settings for Portage. This comes from the portage package itself. Settings in \fBmake.conf\fR or \fBpackage.env\fR override values here. The format is described extensivly in \fBmake.conf\fR(5). .RE .TP .BR /var/cache/edb/ .RS This directory is used to store internal portage cache files. The names and purpose of these files are not documented on purpose so as to keep down bitrot as internals change. If you aren't working on portage internally, then the details most likely do not matter to you. This entire directory can be safely deleted. It is highly recommended you do not do this however as it can be a time consuming process to generate them all again. .RE .TP .BR /var/db/pkg/ .RS All installed package information is recorded here. If portage thinks you have a package installed, it is usually because it is listed here. The format follows somewhat closely that of the portage tree. There is a directory for each category and a package-version subdirectory for each package you have installed. Inside each package directory are misc files that describe the installed contents of the package as well as build time information (so that the package can be unmerged without needing the portage tree). The exact file contents and format are not described here again so that things can be changed quickly. Generally though there is one file per environment variable that "matters" (like CFLAGS) with the contents stored inside of it. Another common file is the CONTENTS file which lists the path and hashes of all objects that the package installed onto your system. .RE .TP .BR /var/lib/portage/ .RS .TP .BR config Hashes which are used to determine whether files in config protected directories have been modified since being installed. Files which have not been modified will automatically be unmerged. .TP .BR world Every time you emerge a package, the package that you requested is recorded here. Then when you run `emerge world \-up`, the list of packages is read from this file. Note that this does not mean that the packages that were installed as dependencies are listed here. For example, if you run `emerge mod_wsgi` and you do not have apache already, then "www\-apache/mod_wsgi" is recorded in the world file but "www\-servers/apache" is not. For more information, review \fBemerge\fR(1). .I Format: .nf \- one DEPEND atom base per line .fi .I Example: .nf games\-misc/fortune\-mod\-gentoo\-dev dev\-libs/uclibc app\-cdr/cdemu .fi .TP .BR world_sets This is like the world file but instead of package atoms it contains packages sets which always begin with the \fB@\fR character. Use \fB/etc/portage/sets/\fR to define user package sets. .I Example: .nf @kde .fi .RE .SH "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .SH "AUTHORS" .nf Marius Mauch Mike Frysinger Drake Wyrm Arfrever Frehtes Taifersar Arahesis .fi .SH "SEE ALSO" .BR emerge (1), .BR ebuild (1), .BR ebuild (5), .BR make.conf (5), .BR color.map (5)