Showing and Changing Facet Values
Facet properties have default values in the image and are not required to be explicitly set. Facet properties whose names begin with facet.debug
or facet.optional
have the value false
by default. All other facet properties have the value true
by default.
A facet tag on an action in a package manifest can only have the value true
or all
. See How Facet and Variant Values Affect Package Installation for a description and example. Actions tagged with facets whose names begin with facet.debug
or facet.optional
will not be installed by default. To install such actions, you must change the facet property value in the image to true
. Actions tagged with any other facet will be installed by default. To avoid installing such actions, you must change the facet property value in the image to false
.
Changing the value of a version-lock facet (version-lock.
package-name) does not cause actions to be installed or uninstalled. Instead, version-lock facets enable or disable an incorporate
type depend
action. See Updating a Package Constrained by a Constraint Package.
Facet property values have one of the following three sources. These source names appear in the SRC column of pkg facet
command output.
-
system
– Values assigned by the system. These values usually are values of facet tags specified in system packages. -
local
– Values set by using thepkg change-facet
command or by using IPS APIs. -
parent
– Values inherited from a parent image. For example, a non-global zone inherits facet settings from the global zone.
Use the pkg facet
command to display the current value and source of that value of all facet properties that either have been set locally in this image or have been inherited from a parent image.
Use the pkg facet -a
command to display the values of all facets that are explicitly set in the image and all facets that are set in installed packages.
The following pkg facet
commands show that no doc.
facet properties are set locally or inherited:
$ pkg facet doc.* FACET VALUE SRC pkg facet: no matching facets found $ pkg facet -a doc.* FACET VALUE SRC doc.help True system doc.html True system doc.info True system doc.man True system doc.pdf True system doc.ps True system
Use the pkg change-facet
command to change the value of a facet property. You can set a facet property value to true
, false
, or none
. Setting a facet property to none
applies the system default value to that facet (either true
or false
), and the source is shown as system
.
Note:
Changing facet property values might update a large number of packages and might require a new BE. Use the-nv
options to review what changes will be made before you make any changes.
A facet set on the image can be a full facet such as doc.man
or a pattern such as locale.*
. This flexibility is useful when you want to disable a portion of the facet namespace and only enable individual facets within that namespace. For example, you could disable all locales and then only enable one or two specific locales, as shown in the following example:
$ pkg change-facet locale.*=false locale.en_US=true
In the following pkg change-facet
command, a new BE was not created, but a backup BE was created. See Boot Environment Policy Image Properties for information about when BEs are created. When a backup BE is created, the original image is saved in the backup, and the current BE is changed. The original value of None
under Changed Variants/Facets indicates that no local setting existed prior to this command execution; only the system settings existed, as shown by the pkg facet
commands above.
$ pkg change-facet -v doc.*=false doc.man=true
Packages to change: 97
Variants/Facets to change: 2
Services to change: 1
Estimated space available: 306.34 GB
Estimated space to be consumed: 936.87 MB
Create boot environment: No
Create backup boot environment: Yes
Rebuild boot archive: No
Changed variants/facets:
facet doc.* (local): None -> False
facet doc.man (local): None -> True
Changed packages:
solaris
...
Services:
restart_fmri:
svc:/application/texinfo-update:default
PHASE ITEMS
...
The following pkg facet
commands show the doc.
facet property changes that resulted from the pkg change-facet
command:
$ pkg facet doc.* FACET VALUE SRC doc.* False local doc.man True local $ pkg facet -a doc.* FACET VALUE SRC doc.* False local doc.help False local doc.html False local doc.info False local doc.man True local doc.pdf False local doc.ps False local