Stepping aside from the official tree
Updated 13 Août 2019
Using your own Portage tree
Excluding a package or a category
You can update your software in a selective manner, ignoring the category/package updates that you do no need. This is achieved by excluding those categories/packages from the
rsync routine when running
To do so, you need to specify, in , the file containing the templates of the excluded package:
As an example, let's exclude all games:
Note, though, that this can lead to dependency problems, as the new allowed packages may depend on other new packages that are not allowed to be updated.
Adding a non-official ebuild
Defining a new overlay
You can tell Portage to use ebuild files that are not included in the official Portage tree. Create a new directory (for example, ) where third-party ebuild files will be located. Note that you must use a directory structure identical to the the official Portage tree.
Then define the variable in , pointing to the previously created directory. Now, when using Portage, those ebuilds will be considered as part of the system and will not be deleted or overwritten at subsequent launches of
Working with several overlay directories
Advanced developer users, who work in several overlay directories, test packages before they are added to the main tree or just prefer to use unofficial ebuilds from a variety of sources, will appreciate the
layman tool provided by . It will help keep your overlays up to date.
layman, then add the overlays you want to use:
layman -a overlay_name
Imagine that you have two additional repositories named
~java~ (for your Java development project) and ~entapps~~ (for corporate applications for internal use). You can update those repositories by typing:
Non-Portage maintained software
Using Portage with self-maintained software
Sometimes you may want to configure, install and maintain software individually without having Portage automate the process, even though Portage can provide the software titles. The most common cases are the kernel and nVidia drivers. It is possible to configure Portage so it knows that a certain package is manually installed on the system. This process is called _injectingi and is supported by Portage through the file.
For example, if you want to tell Portage that ~vanilla-sources-220.127.116.11~~ is installed manually, you need to add the following line to the 'package.provided' file: