PORTAGE

Section: Portage (5)
Updated: Jan 2004
 

NAME

portage - the heart of Gentoo  

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.
Note:
If you are looking for information on how to emerge something, please see emerge(1).
 

SYNOPSIS

/etc/
make.globals
make.conf(5)
/etc/make.profile/
deprecated
make.defaults
packages
packages.build
use.defaults
use.mask
virtuals
/etc/portage/
bashrc
package.mask
package.unmask
package.keywords
package.use
mirrors
categories
/usr/portage/profiles/
arch.list
categories
package.mask
thirdpartymirrors
use.desc
use.local.desc
use.mask
/var/lib/portage/
world
 

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.
DEPEND atom
A string which matches a package. It is of the form category/package. It may also contain optional logical operators and versions.
More reading: ebuild(5)
KEYWORD
Each architecture has a unique KEYWORD.
More reading: ebuild(5)
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.
More reading: ebuild(5)
 

SPECIFIC FILE DESCRIPTIONS

/etc/
make.globals
The global default settings for Portage. This comes from the portage package itself. Settings in make.conf override values here. The format is described extensivly in make.conf(5).
make.conf
The global custom settings for Portage. See make.conf(5).
/etc/make.profile/
This is usually just a symlink to the correct profile in /usr/portage/profiles/. 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 /etc/make.profile/ directory and populate it. However, if you just wish to override some settings, do NOT edit these files because they WILL be lost with the next `emerge --sync`. See the section below on /etc/portage/ for overriding.
deprecated
The existence of this file marks a profile as deprecated, meaning it is not supported by Gentoo anymore. It contains the name of the profile to which users are encouraged to upgrade.
make.defaults
The profile default settings for Portage. The general format is described in make.conf(5). The make.defaults for your profile defines a few specific variables too:

ARCH
Architecture type (x86/ppc/hppa/etc...).
USERLAND = GNU
Support BSD/cygwin/etc...
PORTAGE_LIBC = glibc
Support uClibc/BSD libc/etc...
PROFILE_ARCH
Distinguish machines classes that have the same ARCH. All sparc machines have ARCH=sparc but set this to either 'sparc32' or 'sparc64'.
STAGE1_USE
Special USE flags which may be needed when bootstrapping from stage1 to stage2.
GRP_STAGE23_USE
Special USE flags used by catalyst for building a stage3 and GRP sets.
packages
This file serves two purposes. The first is to mask out specific packages/versions on a per-profile basis. The second is to provide the list of packages that compose the special system class.

Format:

- comments begin with #
- one DEPEND atom per line of what to mask OUT
- packages to be added to the system class begin with a *
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 '-'.

Example:

# i am a comment !
# only allow versions of glibc less than 2.3
<sys-libs/glibc-2.3
# add any version of bash to the system class
*app-shells/bash
# only allow versions of readline earlier than 4.2
# and add it to the system class
*<sys-libs/readline-4.2
packages.build
A list of packages (one per line) that make up a stage1 tarball. Really only useful for stage builders.
use.defaults
Here we DO NOT define the default USE flags, but the so-called auto-USE flags. This rather unknown portage feature activates a USE flag if a specific package is installed and the flag was not explicitly deactivated. This file contains the associations between USE flags and packages that trigger the auto-USE feature.

In other words, if we never put "sdl" or "-sdl" into our USE, but we have media-libs/libsdl emerged, then portage automagically sticks "sdl" into our USE for us.

Format:

- comments begin with #
- one USE flag per line with a list of DEPEND atom bases

Example:

# media-libs/libsdl will activate "sdl"
sdl        media-libs/libsdl
# activate tcltk only if we have both 
# dev-lang/tcl and dev-lang/tk
tcltk      dev-lang/tcl   dev-lang/tk
use.mask
Some USE flags don't make sense on some archs (for example altivec on non-ppc or mmx on non-x86). Here we list the masked ones.

Format:

- comments begin with #
- one USE flag per line
virtuals
This controls what packages will provide a virtual by default. For example, if a package needs to send e-mail, it will need virtual/mta. In the absence of a package that provides virtual/mta (like qmail, sendmail, postfix, etc...), portage will look here to see what package to use. In this case, Gentoo uses net-mail/ssmtp as the default (as defined in the virtuals file) because it's the package that does the very bare minimum to send e-mail.

Format:

- comments begin with #
- one virtual and DEPEND atom base pair per line

Example:

# use net-mail/ssmtp as the default mta
virtual/mta           net-mail/ssmtp
# use app-dicts/aspell-en as the default dictionary
virtual/aspell-dict   app-dicts/aspell-en
/etc/portage/
bashrc
If needed, this file can be used to set up a special environment for ebuilds, different from the standard root environment. The syntax is the same as for any other bash script.
package.mask
A list of DEPEND atoms to mask. Useful if specific versions of packages do not work well for you. For example, you swear by the Nvidia drivers, but only versions earlier than 1.0.4496. No problem!

Format:

- comments begin with #
- one DEPEND atom per line

Example:

# mask out versions 1.0.4496 of the nvidia
# drivers and later
>=media-video/nvidia-kernel-1.0.4496
>=media-video/nvidia-glx-1.0.4496
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 below). Note that this does not override packages that are masked via KEYWORDS.
package.keywords
Per-package KEYWORDS. Useful for mixing unstable packages in with a normally stable machine or vice versa. This will allow you to augment ACCEPT_KEYWORDS for a single package.

Format:

- comments begin with #
- one DEPEND atom per line followed by additional ACCEPT_KEYWORDS 

Example:

# always use unstable libgd
media-libs/libgd ~x86
# only use stable mplayer
media-video/mplayer -~x86
# use a package that is marked -*
>=sys-kernel/linux-headers-2.6 -*
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!

Format:

- comments begin with #
- one DEPEND atom per line with space-separated row of USE flags

Example:

# turn on docs for GTK 2.x
=x11-libs/gtk+-2* doc
# disable mysql support for QT
x11-libs/qt -mysql
mirrors
Whenever portage encounters a mirror:// style URL it will look up the actual hosts here. If the mirror set is not found here, it will check the global mirrors file at /usr/portage/profiles/thirdpartymirrors. You may also set a special mirror type called "local". This list of mirrors will be checked before GENTOO_MIRRORS and will be used even if the package has RESTRICT="nomirror".

Format:

- comments begin with #
- mirror type followed by a list of hosts

Example:

# local private mirrors used only by my company
local ftp://192.168.0.3/mirrors/gentoo http://192.168.0.4/distfiles

# people in japan would want to use the japanese mirror first
sourceforge http://keihanna.dl.sourceforge.net/sourceforge

# people in tawain would want to use the local gnu mirror first
gnu ftp://ftp.nctu.edu.tw/UNIX/gnu/
categories
A simple list of valid categories that may be used in /usr/portage, PORTDIR_OVERLAY, and PKGDIR (see make.conf(5)). This allows for custom categories to be created.

Format:

- one category per line

Example:

app-hackers
media-other
virtuals
This controls what packages will provide a virtual by default. For example, if a package needs to send e-mail, it will need virtual/mta. In the absence of a package that provides virtual/mta (like qmail, sendmail, postfix, etc...), portage will look here to see what package to use. In this case, Gentoo uses net-mail/ssmtp as the default (as defined in the virtuals file) because it's the package that does the very bare minimum to send e-mail.

Format:
- comments begin with #
- one virtual and DEPEND atom base pair per line

Example:
# use net-mail/ssmtp as the default mta
virtual/mta net-mail/ssmtp
# use app-dicts/aspell-en as the default dictionary
virtual/aspell-dict app-dicts/aspell-en

/usr/portage/profiles/
Global Gentoo settings that are controlled by the developers. To override these settings, you can use the files in /etc/portage/.
arch.list
A list of all valid KEYWORDS. This does not include modifiers.

Format:

- one KEYWORD per line

Example:

x86
ppc
sparc
categories
A simple list of valid categories that may be used in /usr/portage, PORTDIR_OVERLAY, and PKGDIR (see make.conf(5)).

Format:

- one category per line

Example:

app-admin
dev-lang
games-strategy
sys-kernel
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.

Format:

- comments begin with #
- one DEPEND atom per line

Example:

# masked for security reasons
<sys-libs/zlib-1.1.4
# <caleb@gentoo.org> (10 Sep 2003)
# new kde betas
=kde-base/kde-3.2.0_beta1
=kde-base/kdeaccessibility-3.2.0_beta1
thirdpartymirrors
Controls the mapping of mirror:// style URLs to actual lists of mirrors. Keeps us from overloading a single server.

Format:

- comments begin with #
- mirror type followed by a list of hosts

Example:

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
use.desc
All global USE flags must be listed here with a description of what they do.

Format:

- comments begin with #
- use flag - some description

Example:

3dfx - Adds support for 3dfx video cards
acl - Adds support for Access Control Lists
doc - Adds extra documentation
use.local.desc
All local USE flags must be listed here along with the package and a description.

Format:

- comments begin with #
- package:use flag - description

Example:

app-editors/nano:justify - Toggles the justify option
dev-games/clanlib:clanJavaScript - Enables javascript support
dev-libs/DirectFB:fusion - Adds Multi Application support
games-emulation/xmess:net - Adds network support
use.mask
Just like the use.mask found in /etc/make.profile/. See above for more information.
/var/lib/portage/
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_php` and you do not have apache already, then "dev-php/mod_php" is recorded in the world file but "net-www/apache" is not. For more information, review emerge(1).

Format:

- one DEPEND atom base per line

Example:

games-misc/fortune-mod-gentoo-dev
dev-libs/uclibc
app-cdr/cdemu
 

AUTHORS

Marius Mauch <genone@gentoo.org>
Mike Frysinger <vapier@gentoo.org>
Drake Wyrm <wyrm@haell.com>
 

REPORTING BUGS

Please report bugs via http://bugs.gentoo.org/  

SEE ALSO

emerge(1), ebuild(1), ebuild(5), make.conf(5)  

CVS HEADER

$Header: /var/cvsroot/gentoo-src/portage/man/portage.5,v 1.17 2004/10/20 17:40:54 carpaski Exp $


 

Index

NAME
DESCRIPTION
SYNOPSIS
GLOSSARY
SPECIFIC FILE DESCRIPTIONS
AUTHORS
REPORTING BUGS
SEE ALSO
CVS HEADER
blog comments powered by Disqus