sets.conf Syntax

Single Set Configuration
Multi Set Configuration

Unlike other Portage configuration files sets.conf uses Pythons ConfigParser module, which implements the syntax usually found in .ini files. At its core it allows various named sections that each can contain any number of key-value pairs, see the Python documentation for the full details.

In a sets.conf file, a section can define either a single package set, or a complete class of sets. These cases are handled in different ways, and will be explained in detail in the following sections.

Single Set Configuration

The configuration of a single set can be very simple as in most cases it only requires a single option class to be complete [1]. That option defines which handler class should be used to create the set. Other universal options available for single sets are:

  • name (which is usually not needed as the name of the set is generated from the section name if name is missing)

  • world-candidate, which determines if given package should be added to the world set

Some handler classes might require additional options for their configuration, these will be covered later in this chapter.

Here are a few examples for single sets taken from the default configuration file:

			# The classic world set
			class = portage.sets.base.DummyPackageSet
			packages = @selected @system

			# The selected-packages set
			class = portage.sets.files.WorldSelectedPackagesSet

			# The classic system set
			class = portage.sets.profiles.PackagesSystemSet

[1] Technically the class option isn't strictly required, but it should always be used as the default handler might be changed in future versions.