How Facet and Variant Values Affect Package Installation
Both facets and variants are comprised of the following two components:
-
A property set on the image
-
Tags set on actions in a package manifest
Facet and variant tag values set on an action in a package manifest compared with the corresponding facet and variant property values set in the image determine whether that action can be installed.
Each facet and variant property and tag has a name and a value. A single package action can have multiple facet and variant tags.
Values of facet and variant properties and tags do not need to be set explicitly. Values can be default values or inherited values. For example, a non-global zone can inherit values from its parent global zone. Some variant property values are set in the image at initial system installation and cannot be changed.
The following algorithm describes how the facet and variant property values set on the image affect whether a particular action is installed. Values are described in more detail in the following sections.
-
An action that has no facet or variant tags in the package manifest is always installed.
-
An action that has facet tags in the package manifest is installed if the following conditions exist in the image:
-
All facet tags on the action that have a value of
all
have a facet property value oftrue
in the image, either by default or by being set explicitly. -
If any facet tag on the action has a value of
true
, at least one of those facet property values is alsotrue
in the image, either by default or by being set explicitly.
In the following example, the file
test.txt
is installed only if bothdevel
andoptional.test
aretrue
in the image and eitherdoc.info
ordoc.help
istrue
in the image.file path=usr/share/doc/test.txt facet.devel=all facet.optional.test=all facet.doc.info=true facet.doc.help=true
-
-
An action with variant tags in the package manifest is installed only if the values of all the variant tags are the same as the values of the corresponding variant properties set in the image.
In the following example, the file
x86test.txt
will not be installed. The following package manifest excerpt shows two variant tags set on the filex86test.txt
:file path=usr/share/doc/x86test.txt variant.arch=i386 variant.debug.osnet=true
The following command shows the values of these variant properties in the image:
$ pkg variant arch debug.osnet VARIANT VALUE arch i386 debug.osnet false
-
An action with both facet and variant tags is installed if both the facet and the variant property values allow the action to be installed.