|Skip Navigation Links|
|Exit Print View|
|Adding and Updating Oracle Solaris 11.1 Software Packages Oracle Solaris 11.1 Information Library|
Every package that is part of the Oracle Solaris 11 OS has a dependency on an incorporation package. Incorporation packages constrain the versions of the their incorporated packages to help keep the system in a supportable state across updates. Some incorporated packages might be safe to downgrade or upgrade at a version different from the version specified by the incorporation. Such incorporated packages have a version-lock.pkg_name facet attribute specified in the incorporation package. The default value of the version-lock.pkg_name facet is true. To relax the version constraint on a package, set the value of its version-lock.pkg_name facet to false.
In the following example, you want to downgrade to an earlier version of package. The pkg update command downgrades as well as upgrades packages.
$ pkg list -af library/security/openssl NAME (PUBLISHER) VERSION IFO library/security/openssl 18.104.22.168-0.175.1.0.0.19.0 i-- library/security/openssl 22.214.171.124-0.175.1.0.0.18.0 --- $ 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.18.0:20120611T201116Z Reason: This version is excluded by installed incorporation pkg://firstname.lastname@example.org,5.11-0.175.1.0.0.19.0:20120625T163952Z
To relax the version constraint on this package, set its version-lock facet to false. Then try the downgrade again. Notice that a new BE is not created, but a backup BE is created. See Boot Environment Policy Image Properties for information about when BEs are created.
$ pfexec pkg change-facet facet.version-lock.library/security/openssl=false Packages to update: 850 Variants/Facets to change: 1 Create boot environment: No Create backup boot environment: Yes PHASE ITEMS Removing old actions 1/1 Updating image state Done Creating fast lookup database Done Reading search index Done Building new search index 850/850 $ pfexec pkg update email@example.com Packages to update: 1 Create boot environment: No Create backup boot environment: Yes DOWNLOAD PKGS FILES XFER (MB) SPEED Completed 1/1 10/10 1.6/1.6 0B/s PHASE ITEMS Removing old actions 3/3 Installing new actions 3/3 Updating modified actions 14/14 Updating package state database Done Updating package cache 1/1 Updating image state Done Creating fast lookup database Done Reading search index Done Updating search index 1/1 $ pkg list library/security/openssl NAME (PUBLISHER) VERSION IFO library/security/openssl 126.96.36.199-0.175.1.0.0.18.0 i--
To prevent this package from being downgraded or upgraded, freeze the package at the current 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 188.8.131.52-0.175.1.0.0.18.0:20120611T201116Z $ pkg list library/security/openssl NAME (PUBLISHER) VERSION IFO library/security/openssl 184.108.40.206-0.175.1.0.0.18.0 if-
To re-enable downgrade or upgrade, use the pkg unfreeze command to remove the version freeze. If the package is installed at a version lower than the version specified in the incorporation package, setting the version-lock facet for this package to true installs the version specified in the incorporation package.
If other installed packages have require dependency relationships with the package that you want to downgrade or upgrade, you might need to also relax version constraints on those related packages. In the following example, version constraints have been lifted on the hexedit package, but installation is rejected because of version constraints on the system/library package.
$ pfexec pkg install firstname.lastname@example.org Creating Plan (Solver setup): - pkg install: No matching version of editor/hexedit can be installed: Reject: pkg://email@example.com,5.11-0.175.1.0.0.21.0:20120723T170720Z Reason: All versions matching 'require' dependency pkg:/firstname.lastname@example.org,5.11-0.175.1.0.0.20.0 are rejected Reject: pkg://email@example.com,5.11-0.175.1.0.0.20.0:20120709T163421Z pkg://firstname.lastname@example.org,5.11-0.175.1.0.0.21.0:20120723T163000Z Reason: This version is excluded by installed incorporation pkg://email@example.com,5.11-0.175.1.0.0.19.0:20120625T152525Z
In addition to individual component packages, you can also relax version constraints on incorporations. In this case, setting the version-lock facet to false enables you to unlock the incorporation from the rest of the system, while the packages it incorporates continue to be synchronized.