Updating a Package Constrained by a Constraint Package
Error messages:
-
No suitable version of installed package package found
-
All versions matching 'incorporate' dependency package are rejected
-
This version excluded by specified installation version
-
This version is excluded by installed incorporation
For packages constrained by a constraint package, best practice is to update the constraint package, keeping all of the constrained packages as a tested-together set.
If you still want to update just one package from a constraint package, check whether that package has a version-lock
facet set to true
. If a package has an associated version-lock
facet, then you can unlock that package from its constraint package. Set the version-lock
facet to false
to remove the constraint, and then try again to install or update the package. Specify the -nv
options and the version of the package you want in the FMRI of the package name. See also Relaxing Version Constraints Specified by Constraint Packages.
Example A-1 Unlock and Update the Java Runtime Environment
The following example shows how to update the runtime/java/jre-7
package. The jre-7
package is constrained by the consolidation/java/java-incorporation
package, and the java-incorporation
package is in turn constrained by the pkg:/entire
constraint package.
The following command shows that the 0.175.2.0.0.9.0
version of jre-7
is currently installed and shows that a newer version is available from configured package repositories:
$ pkg list -af runtime/java/jre-7
NAME (PUBLISHER) VERSION IFO
runtime/java/jre-7 1.7.0.21-0.175.2.0.0.13.0 ---
runtime/java/jre-7 1.7.0.17-0.175.2.0.0.9.0 i--
Removing the -f
option shows which versions are available to update to. The following pkg list
output shows that no newer version can be installed in this image, and the pkg update
command output confirms this state. The -n
option shows what changes would be made but does not make any changes.
$ pkg list -a runtime/java/jre-7 NAME (PUBLISHER) VERSION IFO runtime/java/jre-7 1.7.0.17-0.175.2.0.0.9.0 i-- $ pkg update -nv runtime/java/jre-7 No updates available for this image.
To show more information about why this package cannot be updated, specify the version to which you want to update. The output shown in the following example indicates that the installed java-incorporation@0.5.11,5.11-0.175.2.0.0.9.0
package does not allow the installation of the jre-7@1.7.0.21-0.175.2.0.0.13.0
package. The java-incorporation@0.5.11,5.11-0.175.2.0.0.13.0
package would allow the installation of the jre-7@1.7.0.21-0.175.2.0.0.13.0
package, but the installed entire@0.5.11,5.11-0.175.2.0.0.12.0
constraint package does not allow the installation of the jre-7@1.7.0.21-0.175.2.0.0.13.0
package.
$ pkg update -nv runtime/java/jre-7@1.7.0.21-0.175.2.0.0.13.0 pkg update: No solution was found to satisfy constraints maintained incorporations: [output omitted] pkg://solaris/entire@0.5.11,5.11-0.175.2.0.0.12.0:20130415T172730Z Plan Creation: dependency error(s) in proposed packages: [output omitted] No suitable version of required package pkg://solaris/consolidation/java/java- incorporation@0.5.11,5.11-0.175.2.0.0.9.0:20130304T213946Z found: Reject: pkg://solaris/consolidation/java/java-incorporation@0.5.11,5.11-0.1 75.2.0.0.9.0:20130304T213946Z Reason: All versions matching 'incorporate' dependency pkg:/runtime/java/jr e-7@1.7.0.17,5.11-0.175.2.0.0.9.0 are rejected Reject: pkg://solaris/runtime/java/jre-7@1.7.0.17,5.11-0.175.2.0.0.9.0:20 130304T214022Z Reason: This version excluded by specified installation version Reject: pkg://solaris/runtime/java/jre-7@1.7.0.17,5.11-0.175.2.0.0.9.0: 20130304T214022Z Reason: This version excluded by specified installation version Reject: pkg://solaris/consolidation/java/java-incorporation@0.5.11,5.11-0 .175.2.0.0.13.0:20130429T145534Z Reason: This version is excluded by installed incorporation pkg://solaris /entire@0.5.11,5.11-0.175.2.0.0.12.0:20130415T172730Z Plan Creation: Errors in installed packages due to proposed changes: [output omitted] No suitable version of installed package pkg://solaris/consolidation/java/java -incorporation@0.5.11,5.11-0.175.2.0.0.9.0:20130304T213946Z found Reject: pkg://solaris/consolidation/java/java-incorporation@0.5.11,5.11-0.1 75.2.0.0.9.0:20130304T213946Z Reason: All versions matching 'incorporate' dependency pkg:/runtime/java/jr e-7@1.7.0.17,5.11-0.175.2.0.0.9.0 are rejected Reject: pkg://solaris/runtime/java/jre-7@1.7.0.17,5.11-0.175.2.0.0.9.0:20 130304T214022Z Reason: This version excluded by specified installation version Reject: pkg://solaris/consolidation/java/java-incorporation@0.5.11,5.11-0.1 75.2.0.0.13.0:20130429T145534Z Reason: This version is excluded by installed incorporation pkg://solaris/e ntire@0.5.11,5.11-0.175.2.0.0.12.0:20130415T172730Z
Best practice is to update the entire
package. Updating the entire
package would update the java-incorporation
package, which would update the jre-7
package. In this example, you need to update the Java packages and cannot move your image forward to an updated version of entire
.
The version of the Java software that can be installed is constrained by setting the version-lock
facet for the Java constraint package. To update the Java software without updating other software, unlock the version-lock
facet of the Java constraint package and then update the Java constraint package. For more information about version-lock facets, see Relaxing Version Constraints Specified by Constraint Packages.
The following command changes the value of the version-lock
facet of the installed java-incorporation
package to false
. The number of packages to update is the number of packages installed in this image, because each package in the image is checked for this facet.
$ pkg change-facet \ facet.version-lock.consolidation/java/java-incorporation=false Packages to update: 856 Variants/Facets to change: 1 Create boot environment: No Create backup boot environment: Yes Planning linked: 1/1 done PHASE ITEMS Removing old actions 1/1 Updating image state Done Creating fast lookup database Done Reading search index Done Building new search index 856/856
The following command shows that the facet value has been changed:
$ pkg facet
FACETS VALUE
facet.version-lock.consolidation/java/java-incorporation False
Because the following command specifies the -n
option, this command shows what would be change but does not actually make any changes to your image.
$ pkg update -nv java-incorporation
Packages to update: 2
Estimated space available: 80.91 GB
Estimated space to be consumed: 687.28 MB
Create boot environment: No
Create backup boot environment: Yes
Rebuild boot archive: No
Changed packages:
solaris
consolidation/java/java-incorporation
0.5.11,5.11-0.175.2.0.0.9.0:20130304T213946Z -> 0.5.11,5.11-0.175.2.0.0.13.0
:20130429T145534Z
runtime/java/jre-7
1.7.0.17,5.11-0.175.2.0.0.9.0:20130304T214022Z -> 1.7.0.21,5.11-0.175.2.0.0.
13.0:20130429T145626Z
The following command performs the actual update. This command performs the update in the current image. You might want to use the --be-name
option to perform the update in a new boot environment.
$ pkg update -v java-incorporation
Packages to update: 2
Estimated space available: 80.91 GB
Estimated space to be consumed: 687.28 MB
Create boot environment: No
Create backup boot environment: Yes
Rebuild boot archive: No
Changed packages:
solaris
consolidation/java/java-incorporation
0.5.11,5.11-0.175.2.0.0.9.0:20130304T213946Z -> 0.5.11,5.11-0.175.2.0.0.13.0
:20130429T145534Z
runtime/java/jre-7
1.7.0.17,5.11-0.175.2.0.0.9.0:20130304T214022Z -> 1.7.0.21,5.11-0.175.2.0.0.
13.0:20130429T145626Z
DOWNLOAD PKGS FILES XFER (MB) SPEED
Completed 2/2 171/171 61.9/61.9 0B/s
PHASE ITEMS
Removing old actions 7/7
Installing new actions 6/6
Updating modified actions 170/170
Updating package state database Done
Updating package cache 2/2
Updating image state Done
Creating fast lookup database Done
Reading search index Done
Updating search index 2/2
The following command verifies that the jre-7
package is updated in this image. If you perform the update in a new boot environment, use beadm mount
and the pkg -R
to do the following check in that new boot environment.
$ pkg list jre-7
NAME (PUBLISHER) VERSION IFO
runtime/java/jre-7 1.7.0.21-0.175.2.0.0.13.0 i--