As configuring each single set manually could be quite annoying if
you want many sets with the same options Portage also allows to
define whole classes of sets in a single section. Like with single
sets each section still requires the class
option,
but to indicate that the section should generate multiple sets it's
also necessary to set the multiset
option to
true
. The world-candidate
option also supported like with
single sets (they'll apply to all sets generated by the section).
As it doesn't make much sense to specify a single name for multiple sets
the name
option isn't available for multiset sections.
Most handler classes will have a reasonable default for generating names,
and usually you can (but don't have to) set the
name_pattern
option to change the naming rules. That
option generally has to include a (handler-specific) placeholder that
will be replaced with a unique identifier (e.g. for category sets the
category name). As with single sets handler classes might require and/or
support additional options, these will be discussed later.
Some examples for multiset configurations:
# generate a set for each file in /etc/portage/sets # this section is also in the default configuration [user sets] class = portage.sets.files.StaticFileSet multiset = true directory = /etc/portage/sets # Generate a set for each category that includes all installed packages # from that category. The sets will be named <category>/* [installed category packages] class = portage.sets.dbapi.CategorySet multiset = true repository = vartree name_pattern = $category/*