Ebuild repository/fr

Within Gentoo Linux, users already have one "main" package repository, in the past synonymously referred to as the "Portage tree", although this term should be phased out since package managers other than Portage can interact with package repositories in Gentoo. The main repository contains all the software packages (called ebuilds) maintained by Gentoo developers. Users can add additional repositories to the tree that are "layed over" the main tree - hence the name, overlays.

Since package repositories are nothing more (or less) than a set of files (ebuilds, metadata files, ChangeLog entries ...) these repositories can be pulled in from public repositories (git, cvs, svn ...) or downloaded as tarballs and extracted manually onto the system. It is advised to use managed repositories by trusted third parties; any installed overlay will cause Portage to look through the overlayed files when deciding which software to install. If compromised code is in the overlay, then compromised packages could be installed on the system.

Repositories
Additional package trees are usually hosted by repositories. These are overlays that are ready to be incorporated on Gentoo systems. The now default approach for handling repositories is through which, like many other Portage related locations, can be a directory as well.

A deprecated, yet still supported method is to use the  variable inside. This variable can point to one or more additional locations on the file system where repositories are available. The use of the directory is highly preferred.

Repository definitions inside also inform Portage if and how the repository can be updated. With it, calling emerge --sync will automatically update the repositories as well.

For more information, see /etc/portage/repos.conf and the Portage/Sync article.

Priorités des arbres alternatifs
Chacun des arbres alternatifs dispose d'une priorité unique. Ceci fait que, dans le cas où une version spécifique serait trouvée dans plusieurs arbres alternatifs, la résolutions est non ambigüe. Les ebuilds des arbres alternatifs à la plus haute priorité sont prioritaires par rapport à ceux trouvés dans des arbres de priorité moindre.

La commande suivante fournit la liste des arbres alternatifs avec leur priorité :

The default Gentoo Portage tree will have a priority of -1000. That means that all other overlays generally take precedence as they are assigned a higher priority. That is the default behavior, because overlays are designed to "lay over/on top" of the portage tree.

Supporting tools
A number of tools support or integrate with overlays.

Layman
The layman application makes it easier to manage and update multiple additional overlays. It is a command-line application through which publicly available overlays can be listed, subscribed to and unsubscribed from, as well as update those repositories.

It supports both the as well as  method.
 * When using the method, layman manages a dedicated configuration file which should be sourced in by
 * When using, layman manages the file directly

Pour faciliter la gestions d'arbres alternatifs multiples, un outil appelé layman a été développé. Cet outil est informé des arbres alternatifs populaires gérés par des utilisateurs et des développeurs et est capable de les installer et de les synchroniser tout autant que de les ajouter aux emplacements déclarés dans.

emaint
See Project:Portage/Sync and man 1 emaint.

Intégration dans eix
eix-sync is a wrapper starting emerge --sync (which in turn starts emaint sync --auto) followed by eix-update. For further details see the Eix article and man 1 eix.

Génération du cache
Lorsque de grands arbres alternatifs sont installés, Portage peut mettre un temps très long pour réaliser des opérations telles que la résolution des dépendances. Ceci est dû au fait, qu'en général, les arbres alternatifs ne possèdent pas de cache des méta-données.

Generate a local metadata cache by running emerge --regen</tt> after syncing the overlays:

Be careful, because emerge --regen</tt> takes a lot of time and it's not recommended for rsync users as rsync updates the cache using server-side caches (most of users of portage are rsync users). Rsync users should simply run emerge --sync</tt> (or eix-sync</tt>) to regenerate the cache. It's probably only users of very large overlays should try emerge --regen</tt>.

Utilisation d'arbres alternatifs non sûrs
Lorsque vous utilisez des arbres alternatifs importants ou des arbres dont la qualité est soit faible, soit inconnue, il est recommandé de masquer en dur tout l'arbre alternatif.

After that unmask the packages that will be installed.

External resources

 * https://overlays.gentoo.org