Adding and Updating Software in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014
 
 

Showing and Changing Variant Values

Use the pkg variant command to display the values of variants that are set.

$ pkg variant
VARIANT                   VALUE
variant.arch              i386
variant.opensolaris.zone  global

The -v option includes the possible variant values that can be set for installed packages.

$ pkg variant -v
VARIANT                   VALUE
variant.arch              i386
variant.arch              sparc
variant.debug.osnet       false
variant.debug.osnet       true
variant.opensolaris.zone  global
variant.opensolaris.zone  nonglobal

Use the pkg change-variant command to change the value of a variant. Use the pkg variant -v command to select a value to set.

The following command produces a large amount of output because so many packages would be affected. Notice that a new BE would not be created by default, but a backup BE would be created. See Boot Environment Policy Image Properties for information about when BEs are created. The -n option shows what would change if you performed the operation without -n, but the command makes no actual changes.

$ pkg change-variant -nv --accept 'variant.debug.*=true'
            Packages to update:       851
     Variants/Facets to change:         3
     Estimated space available:  49.88 GB
Estimated space to be consumed: 270.57 MB
       Create boot environment:        No
Create backup boot environment:       Yes
          Rebuild boot archive:        No

Changed variants/facets:
  variant variant.debug.*: true
    facet facet.locale.en_US: None
    facet facet.locale.*: None
Changed packages:
solaris
  ...