Multi-layer hierarchical profile layout with mix-ins

This article describes the new profile layout idea by Michał Górny (talk).

Hierarchical layers
The profile layout is based on a number of hierarchical layers followed by a mix-in layer. Each of the hierarchical layers defines a number of profile variants. For example, the profile tree could define the following layers (with variants listed):


 * 1) system layer (linux, bsd, …),
 * 2) arch layer (x86, ppc, …).

All profile variants are exclusive. That is, the user must always choose exactly one variant in each hierarchical layer.

The layers are ordered, and the selected profiles are applied in the order of layers. The profiles in following layers may interact with the layers preceding them in two manners:


 * via excludes/conflicts: for example, the bsd system may exclude the ppc arch. In this case, the choice of bsd system makes it disallowed to select ppc, and possibly hides the choice.
 * via profile subvariants. Subvariants are subprofiles that are used instead of the main profile when a particular profile was selected in preceding layer. For example, if x86 defines a linux subvariant, it is used when linux system is combined with x86 arch.