Updating a Constraint Package When a Suitable Dependency Cannot Be Found

Error message: A version for 'incorporate' dependency cannot be found

See Constraint Packages for information about constraint packages and their incorporate dependencies.

Examples of reasons a constraint package might fail to update include the following installation states of an incorporate dependency of the constraint package:

  • The dependent package is frozen at a different version.

  • The dependent package is already installed at a higher version.

  • The dependent package is installed from a different publisher, and that publisher is sticky.

Example A-2 Update pkg:/entire When a Dependency is Unlocked and Separately Updated

The following example attempts to update all installed packages because no package names are specified. One of the installed packages that this operation attempts to update is the pkg:/entire constraint package. This example shows an incorporate dependency of pkg:/entire that is already installed at a higher version.

$ pkg update --be-name s11.2
Creating Plan (Solver setup): /
pkg update: No solution was found to satisfy constraints
Plan Creation: Package solver has not found a solution to update to latest available versions.
This may indicate an overly constrained set of packages are installed.

latest incorporations:
[output omitted]
pkg://solaris/entire@0.5.11,5.11-0.175.2.0.0.10.0:20130318T181506Z

The following indicates why the system cannot update to the latest version:

No suitable version of required package pkg://solaris/entire@0.5.11,5.11-0.175.2
.0.0.10.0:20130318T181506Z found:
 Reject:  pkg://solaris/entire@0.5.11,5.11-0.175.2.0.0.10.0:20130318T181506Z
 Reason:  A version for 'incorporate' dependency on pkg:/consolidation/ub_javavm
/ub_javavm-incorporation@0.5.11,5.11-0.175.2.0.0.9.0 cannot be found

This message says that the version of the pkg:/entire constraint package to which the system attempted to update specifies a version of the ub_javavm-incorporation package that cannot be installed. Because one package cannot be installed, no packages are installed and the update fails.

The following techniques can provide more information about why the ub_javavm-incorporation package cannot be installed:

  • Use -v options. For example, use -v or -vv to receive more verbose output.

  • Specify a package to update. Providing more detailed input often results in more detailed messaging. For example, in addition to the name of the package, include the version in the package FMRI.

The following command includes a -v option and specifies to update to the entire@0.5.11,5.11-0.175.2.0.0.10.0 package, copied from the message above. This command also specifies the -n option instead of the --be-name option. The -n option shows what will be done but does not actually make any changes to this image.

$ pkg update -nv entire@0.5.11,5.11-0.175.2.0.0.10.0
Creating Plan (Solver setup): /
pkg update: No matching version of entire can be installed:
 Reject:  pkg://solaris/entire@0.5.11,5.11-0.175.2.0.0.10.0:20130318T181506Z
 Reason:  All versions matching 'require' dependency pkg:/consolidation/ub_javav
m/ub_javavm-incorporation are rejected
  Reject:  pkg://solaris/consolidation/ub_javavm/ub_javavm-incorporation@0.5.11,
5.11-0.151.0.1:20101105T053418Z
  pkg://solaris/consolidation/ub_javavm/ub_javavm-incorporation@0.5.11,5.11-0.17
5.0.0.0.2.0:20111019T144756Z
  pkg://solaris/consolidation/ub_javavm/ub_javavm-incorporation@0.5.11,5.11-0.17
5.0.10.1.0.0:20120920T143020Z
  Reason:  Excluded by proposed incorporation 'entire'
  Newer version pkg://solaris/consolidation/ub_javavm/ub_javavm-incorporation@0.
5.11,5.11-0.175.2.0.0.13.0:20130429T145201Z is already installed
  Reject:  pkg://solaris/consolidation/ub_javavm/ub_javavm-incorporation@0.5.11,
5.11-0.175.2.0.0.9.0:20130304T213739Z
  Reason:  Newer version pkg://solaris/consolidation/ub_javavm/ub_javavm-incorpo
ration@0.5.11,5.11-0.175.2.0.0.13.0:20130429T145201Z is already installed
 Reject:  pkg://solaris/consolidation/ub_javavm/ub_javavm-incorporation@0.5.11,5
.11-0.175.2.0.0.13.0:20130429T145201Z
 Reason:  Excluded by proposed incorporation 'entire'

These messages say that the version of the ub_javavm-incorporation package that is currently installed in this image is newer than the version specified by the pkg:/entire constraint package that would be installed by the update operation.

The following command shows the version of the ub_javavm-incorporation package that is currently installed.

$ pkg list ub_javavm-incorporation
NAME (PUBLISHER)                                  VERSION                    IFO
consolidation/ub_javavm/ub_javavm-incorporation   0.5.11-0.175.2.0.0.13.0    i--

The following command shows the version of the ub_javavm-incorporation package that is specified by the pkg:/entire constraint package to which the system attempted to update. The version of the pkg:/entire constraint package to which the system attempted to update is copied from the first “Reject” message in the above output. The -r option looks for this package in the configured package repositories, not in the installed image.

$ pkg contents -Hrt depend \
-a facet.version-lock.consolidation/ub_javavm/ub_javavm-incorporation=true \
-o fmri entire@0.5.11,5.11-0.175.2.0.0.10.0
consolidation/ub_javavm/ub_javavm-incorporation@0.5.11-0.175.2.0.0.9.0

To fix this problem, you can instruct the update operation to update all installed packages except for particular specified packages. Use one or more --reject options in the pkg update command to perform the update without attempting to update the packages specified in the --reject options. Wildcards can be used in --reject arguments. In the following command, packages to reject are copied from the “Reject” messages above that precede the “Reason: Newer version is already installed” message.

$ pkg update -v --be-name s11.2 \
--reject 'consolidation/ub_javavm/ub_javavm-incorporation@0.5.11,5.11-0.151*' \
--reject 'consolidation/ub_javavm/ub_javavm-incorporation@0.5.11,5.11-0.175.0*' \
--reject 'consolidation/ub_javavm/ub_javavm-incorporation@0.5.11,5.11-0.175.2.0.0.9.0*'

Tip:

Be careful when you specify --reject arguments: Any packages that match the --reject argument that are already installed will be uninstalled.