|Skip Navigation Links|
|Exit Print View|
|Adding and Updating Oracle Solaris 11.1 Software Packages Oracle Solaris 11.1 Information Library|
Use the pkg freeze command to constrain a package version. One example of a time to freeze a package is when you do not want the package in a non-global zone to be updated when the global zone is updated.
/usr/bin/pkg freeze [-n] [-c reason] [pkg_fmri_pattern] ...
If no version is provided in pkg_fmri_pattern, the named package must be installed and is constrained to the version installed on the system. If a version is provided in pkg_fmri_pattern, then this constraint, or freeze, acts as if an incorporate dependency were installed where the fmri attribute had the value of the provided package version.
When a package that is frozen is installed or updated, it must end up at a version that matches the version at which it was frozen. For example, if a package was frozen at 1.2, then it could be updated to 1.2.1, 1.2.9, 22.214.171.124.1, and so on. That package could not end up at 1.3, or 1.1.
A publisher specified in the pkg_fmri_pattern is used to find matching packages. However, publisher information is not recorded as part of the freeze. A package is frozen with respect to its version only, not its publisher.
Freezing a package that is already frozen replaces the frozen version with the newly specified version.
If no packages are specified, information about currently frozen packages is displayed: package names, versions, when the package was frozen, and any associated reasons.
Freezing a package does not prevent removal of the package. No warning is displayed if the package is removed.
Use the -c option to record the reason the package is being frozen. The reason is shown if a freeze prevents an installation or update from succeeding.
Use the -n option to perform a trial run of the operation, displaying the list of packages that would be frozen without freezing any packages.
In the following example, the package is frozen at the current installed version. The “f” in the package listing indicates that the package is frozen.
$ pfexec pkg freeze -c "Downgrade to avoid bug" library/security/openssl library/security/openssl was frozen at 126.96.36.199-0.175.1.0.0.18.0:20120611T201116Z $ pkg freeze NAME VERSION DATE COMMENT library/security/openssl 188.8.131.52-0.175.1.0.0.19.0:20120625T171753Z 29 Jul 2012 17:45:44 PDT Downgrade to avoid bug $ pkg list library/security/openssl NAME (PUBLISHER) VERSION IFO library/security/openssl 184.108.40.206-0.175.1.0.0.18.0 if-
When you try to install a different version of the frozen package, you see a message about the freeze.
$ pfexec pkg update firstname.lastname@example.org Creating Plan (Solver setup): - pkg update: No matching version of library/security/openssl can be installed: Reject: pkg://email@example.com,5.11-0.175.1.0.0.20.0:20120709T180243Z Reason: This version is excluded by a freeze on library/security/openssl at version 220.127.116.11,5.11-0.175.1.0.0.18.0:20120611T201116Z. The reason for the freeze is: Downgrade to avoid bug
A freeze is never lifted automatically by the packaging system. To relax a constraint, use the pkg unfreeze command.
/usr/bin/pkg unfreeze [-n] [pkg_name_pattern] ...
Remove the constraints that freezing imposes from the specified packages. Any versions provided are ignored.
Use the -n option to perform a trial run of the unfreeze, displaying the list of packages that would be unfrozen without unfreezing any packages.