Packaging and Delivering Software With the Image Packaging System in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014
 
 

Delivering Multiple Implementations of an Application

You might want to deliver multiple implementations of a given application with the following characteristics:

  • All implementations are available in the image.

  • One of the implementations is available from a common directory such as /usr/bin for ease of discovery.

  • An administrator can easily change which implementation is available from the common directory, without adding or removing any packages.

Oracle Solaris 11 delivers multiple implementations of several different applications, such as Java and Python. To specify which implementation is available from a common directory such as /usr/bin, and to enable an administrator to easily change that selection, use a mediated link.

A mediated link manages multiple implementations of an application in a single image. A mediated link is a symbolic link with mediator attributes set (see Attributes of Mediated Links). Software that is packaged with a link action that has mediator attributes is a participant in a mediation. The mediation participant that is available from a common directory such as /usr/bin is called the preferred version. The preferred version in a mediation is determined in one of the following ways:

Specified in the package manifest

You can specify a version (mediator-version) or a versioned implementation (mediator-implementation) for each participant in the mediation. You can specify an overriding priority in case of conflicts (mediator-priority).

Selected by the system

If a participant in the mediation has a priority specified, the participant with the highest value priority is selected as the preferred implementation.

If no participant in the mediation has a priority specified, and a participant has a version specified, the participant with the highest value version is selected as the preferred implementation.

If no participant in the mediation has a priority or version specified, an arbitrary participant is selected as the preferred implementation. If the mediator-implementation of the selected participant includes a version string, the participant with the highest value version string for that mediator-implementation is selected as the preferred implementation.

Specified by an administrator

An administrator can set the preferred implementation by using the pkg set-mediator command. See Specifying a Default Application Implementation in Adding and Updating Software in Oracle Solaris 11.2 .

If only one instance of a particular mediation is installed in an image, then that instance is automatically selected as the preferred implementation of that mediation. If the preferred implementation is set by a system administrator after package installation, installing additional participants in this same mediation does not change the preferred implementation set by the administrator.