Portage Documentation

Mike Frysinger

Marius Mauch

Zac Medico

3.0.31


Table of Contents

I. Configuration
1. Bashrc Configuration
bashrc locations
Ebuild Phase Hooks
Ebuild Die Hooks
Ebuild Success Hooks
2. Package Set Configuration
sets.conf locations
sets.conf Syntax
Single Set Configuration
Multi Set Configuration
Available Set Handler Classes
portage.sets.files.StaticFileSet
Single Set Configuration
Multi Set Configuration
portage.sets.files.ConfigFileSet
Single Set Configuration
Multi Set Configuration
portage.sets.files.WorldSelectedPackagesSet
Single Set Configuraton
portage.sets.files.WorldSelectedSetsSet
Single Set Configuraton
portage.sets.profiles.PackagesSystemSet
Single Set Configuration
portage.sets.ProfilePackageSet.ProfilePackageSet
Single Set Configuration
portage.sets.security.SecuritySet
Single Set Configuration
portage.sets.security.NewGlsaSet
Single Set Configuration
portage.sets.security.NewAffectedSet
Single Set Configuration
portage.sets.security.AffectedSet
Single Set Configuration
portage.sets.shell.CommandOutputSet
Single Set Configuration
portage.sets.dbapi.AgeSet
Single Set Configuration
portage.sets.dbapi.CategorySet
Single Set Configuration
Multi Set Configuration
portage.sets.dbapi.EverythingSet
Single Set Configuration
portage.sets.dbapi.OwnerSet
portage.sets.dbapi.VariableSet
portage.sets.dbapi.UnavailableSet
portage.sets.dbapi.SubslotChangedSet
portage.sets.dbapi.DowngradeSet
portage.sets.libs.PreservedLibraryConsumerSet
Single Set Configuration
Default Sets
II. Dependency Resolution
3. Package Modeling
Constraint Satisfaction
Constraint Types
Package Dependencies
Conflicts
Blocker Conflicts
Slot Conflicts
Indirect Conflicts
Dependency Neglection
4. Decision Making
Dependency Expression Evaluation
Delayed Evaluation of Disjunctive Dependency Choices
Look-Ahead
Constraint Propagation
Expanded Search Space
5. Task Scheduling
Task Dependencies
Conflict Avoidance
Circular Dependencies
Parallel Scheduling
III. Package Formats
6. Ebuild
Ebuild Phases
Interaction with previous installed version
Upgrade/downgrade order used by versions less than 2.1.5 (deprecated)
Upgrade/downgrade order starting with version 2.1.5
Helper Functions
Output
ebegin
eend
einfo
elog
eqawarn
ewarn
EAPI
EAPI 0
Phases
Default src_compile Phase Function
EAPI 1
IUSE defaults
Phases
Default src_compile Phase Function
SLOT Dependencies
EAPI 2
Helpers
doman
Recognition of Language Codes in File Names
Metadata
Dependencies
Blocker Atoms
New Meaning for Old Syntax
New !!atom Syntax
USE Dependencies
Unconditional USE Dependencies
Conditional USE Dependencies
SRC_URI
Customization of Output File Names
Phases
New src_prepare Phase Function
New src_configure Phase Function
Execution Order of Phase Functions
Default Phase Functions
Default Phase Function Alias
EAPI 3
Helpers
unpack
Support for the xz file extension
Support for installation prefix
Helpers
econf
einstall
Variables
EAPI 4
Helpers
Removed dohard and dosed
All helpers die on failure
Controllable Compression
docompress helper
dodoc -r
doins and newins preserve symlinks
doman -i18n option takes precedence over filename language suffix
econf adds --disable-dependency-tracking
use_with and use_enable support empty third argument
Metadata
Dependencies
unset RDEPEND no longer triggers implicit setting
USE Dependency Defaults
REQUIRED_USE
Motivation
Specification
Phases
New pkg_pretend Phase Function
Default src_install no longer a no-op
S to WORKDIR fallback restricted
Variables
AA and KV variables are no longer exported
MERGE_TYPE
REPLACING_VERSIONS and REPLACED_BY_VERSION
EAPI 4-slot-abi
Metadata
SLOT Supports Optional "sub-slot" ABI part
Dependency Atom slot/sub-slot := Operator
Dependency Atom slot/sub-slot :* Operator
EAPI 5
Metadata
REQUIRED_USE supports new at-most-one-of operator
SLOT supports optional "sub-slot" part
Dependency atom slot operators
Profiles
Profile IUSE Injection
Profile stable USE forcing and masking
Helpers
econf adds --disable-silent-rules
new* commands can read from standard input
New option --host-root for {has,best}_version
New doheader helper function
New usex helper function
Phases
src_test supports parallel tests
Ebuild Environment Variables
New EBUILD_PHASE_FUNC variable
IV. Quality Assurance
7. QA Notices
Scanelf: Insecure RUNPATHs
Scanelf: Runtime Text Relocations (TEXTRELS)
Scanelf: Executable Stack (EXECSTACK)
Scanelf: Missing Shared Object Name (SONAME)
Scanelf: Missing Needed Entries
Unresolved soname dependencies
External dependencies
Removal of unecessary files
Addition of DT_RUNPATH entries
Addition of DT_SONAME settings
Adjustment to Portage soname resolution logic
Absolute Symlink In Library Directory
Missing Linker Script
Excessive Files in /
Portage Tempdir In Libtool Scripts
Build Warning: Strict Aliasing
Build Warning: Implicit Declarations
Build Warning: Used Uninitialized
Build Warning: Invalid X<=Y<=Z Comparisons
Build Warning: Non-Null Required
Build Warning: Truncating Pointers

List of Tables

6.1. Slot Dependency Examples
6.2. Man Page Path Translation
6.3. Syntax Examples
6.4. Syntax Examples
6.5. Execution Order of Phase Functions
6.6. Default Phase Functions
6.7. Installation Prefix Variables
6.8. Example Variable Settings