Using an Oracle Solaris Constraint Package

Similar to using the pkg freeze command as shown in the previous section, you can install a package that constrains the version of pkg:/entire that can be installed. See Constraint Packages for more information about constraint packages and their use in Oracle Solaris.

Oracle Solaris 11.4 provides a package that constrains pkg:/entire to any version of Oracle Solaris 11.4.

$ pkg list -s solaris-11.4
NAME (PUBLISHER)                 SUMMARY
release/constraint/solaris-11.4  Constraint Package for Oracle Solaris 11.4

The content of this package shows that if you install this package, you will be able to update your system to any Oracle Solaris 11.4 release (entire@11.4-11.4), such as an Oracle Solaris 11.4 SRU, but not to any newer Oracle Solaris 11.n release.

$ pkg contents -m solaris-11.4
set name=pkg.fmri value=pkg://solaris/release/constraint/solaris-11.4@0,5.11:20170724T163053Z
set name=pkg.summary value="Constraint Package for Oracle Solaris 11.4"
set name=variant.arch value=sparc value=i386
set name=pkg.depend.install-hold value=core-os
depend fmri=entire@11.4-11.4 type=incorporate
depend fmri=entire type=require
  • If you install the solaris-11.4 package and then attempt to update when you already have the newest available Oracle Solaris 11.4 release installed, you will receive a message that no updates are available.

  • If you install the solaris-11.4 package and then attempt to update to a newer Oracle Solaris 11.n release, you will receive a message that your system is overly constrained. To update to a newer Oracle Solaris 11.n release, you must first uninstall the solaris-11.4 constraint package.