Fichiers et répertoires
Updated 4 Juillet 2019
- Fichiers Portage
- File storage
- Software compilation
By default, Portage settings are stored in . If you open this file, you will see that all of them are variables. Each variable will be explained later.
As many directives are architecture-specific, Portage comes with default settings included in your profile. The symlink points to your profile. Portage can be configured via the files of your profile and those of all parent profiles. We will talk more about profiles and /etc/portage/make.profile later on.
You will also find the file, where
cl-update stores the settings of the binary package repo, as well as , where the descriptions of the overlays enabled with
layman are imported to.
Portage variables can also be used as environment variables, but we do not recommend it.
Do you remember the directory? In fact, this is not a directory, but a symbolic link to a profile, by default the one contained in . However, you can create your own profiles anywhere, provided you specify the links to them. The profile the link points to is your system's profile.
A profile contains architecture-specific information for Portage, such as the list of packages in the system, the list of broken (or masked) packages, etc.
If you need to change Portage's behavior regarding software installation, you will need to edit files in . We strongly recommend editing files from to reconfigure Portage. Please do not attempt doing it using environment variables.
The subdirectories available in are:
- stores files listing packages that Portage should never install;
- stores files listing the packages you want to be able to install, even if the Gentoo developers do not recommend it;
- , that stores the files listing packages available for installation, even though they are not recommended for your system or architecture (yet);
- , that stores the files listing package-specific USE values, instead of global ones.
For more information about the directory, as well as the files you can create there, see the Portage man page
Editing Portage files and modifying locations
The above-mentioned configuration files may not be stored anywhere else, as Portage always searches for its configuration files where they belong. Yet Portage also uses quite a few other directories for various purposes: compilation, source code storage, Portage tree storage, etc.
There are default directories that can be modified to your liking by editing . The rest of this chapter is about the dedicated locations Portage uses for its purposes, and how to modify them.
Note that this manual does not reproduce the official documentation. If you need full info, please refer to Portage and man pages (
man portage and
man make.conf respectively).
By default, the Portage tree is stored in . This is defined by the value. If you store the Portage tree somewhere else (by editing this variable), remember to modify the symlink, accordingly.
If you edit , you may also need to edit the following variables: , , since they do not register any + modifications. It has to do with how Portage handles them.
Though Portage does not use precompiled packages by default, they are well supported. If you tell Portage to work with precompiled packages, it will look for them in . This location is defined by the variable.
By default, all source code is saved in . This location is defined by the variable.
Even though Portage cannot use RPM files, it can still create them via the command (see Working with ebuild). By default, Portage stores RPM files in the directory, as defined by .
Base de données Portage
Portage keeps track of the state of your system (packages installed, files relating to specific packages, etc.) in . Do not edit those files manually! It could disorient Portage completely.
Cache de Portage
The Portage cache (including last modification time, virtual packages, dependency data, etc.) is stored in . This location is indeed a cache: you can clear it at any time when Portage-related utilities are not running.
Fichiers temporaires créés par Portage
By default, Portage stores temporary files in . This behaviour is defined by the variable.
If you edit the value, you may have to modify accordingly, since it does not see modifications. This is due to how it is processed by Portage.
Portage creates package-specific build directories in . It is defined by the value.
Locating the live filesystem
By default, Portage installs all files in the current file system (/), but this can be modified by editing the environment variable. It can be useful when creating a customized ISO.
Portage can create ebuild-specific log files, but only if provides a location where Portage (user 'portage') is allowed to write to. This variable is not set by default.