JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Adding and Updating Oracle Solaris 11.1 Software Packages     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

1.  Introduction to the Image Packaging System

2.  IPS Graphical User Interfaces

3.  Getting Information About Software Packages

4.  Installing and Updating Software Packages

5.  Configuring Installed Images

Configuring Publishers

Displaying Publisher Information

Adding, Modifying, or Removing Package Publishers

Controlling Installation of Optional Components

Showing and Changing Variant Values

Showing and Changing Facet Values

Locking Packages to a Specified Version

Relaxing Version Constraints Specified by Incorporations

Specifying a Default Application Implementation

Avoiding Installing Some Packages in a Group Package

Updating an Image

Image Update Best Practices

Specifying the Version to Install

Specifying a Version Constraint Prior to Updating

Constraining the Available Packages

Downgrading an Image

More Update Command Options

Configuring Image and Publisher Properties

Boot Environment Policy Image Properties

Properties for Signing Packages

Image Properties for Signed Packages

Publisher Properties for Signed Packages

Configuring Package Signature Properties

Additional Image Properties

Setting Image Properties

Displaying the Values of Image Properties

Setting the Value of an Image Property

Resetting the Value of an Image Property

Creating an Image

Viewing Operation History

Specifying a Default Application Implementation

You might want to provide multiple versions of an application or tool in the same image. If the different versions of the application are delivered as part of the same mediation, then you can easily reset the version that is the default or preferred version. A mediation is a set of links to different implementations of an application, where each of the links has the same mediator name and the same link path but different target link paths.

Use the pkg mediator command to display all mediators in the image or display the current selected version of the specified mediator.

/usr/bin/pkg mediator [-aH] [-F format] [mediator ...]

Use the pkg set-mediator command to reset the version of a specified mediator that is the default or preferred version.

usr/bin/pkg set-mediator [-nv] [-I implementation]
    [-V version] [--no-be-activate]
    [--no-backup-be | --require-backup-be]
    [--backup-be-name name]
    [--deny-new-be | --require-new-be] [--be-name name]
    mediator ...

In the following example, two different versions of the Java Runtime Environment are installed.

$ pkg list 'runtime/java*'
NAME (PUBLISHER)     VERSION                    IFO
runtime/java         1.6.0.33-0.175.1.0.0.18.1  i--
runtime/java/jre-6   1.6.0.33-0.175.1.0.0.18.1  i--
runtime/java/jre-7   1.7.0.5-0.175.1.0.0.18.0   i--

The following command shows that a java mediation is defined, and version 1.7 is the default version.

$ pkg mediator
MEDIATOR VER. SRC. VERSION IMPL. SRC. IMPLEMENTATION
java     system    1.7     system
php      system    5.2     system
python   vendor    2.6     vendor

The following command shows all java mediations that can be set. Both jre-6 and jre-7 define a symbolic link from /usr/bin/java. In the jre-6 package, the target of the /usr/bin/java link is jdk1.6. In the jre-7 package, the target of the /usr/bin/java link is jdk1.7. The previous command showed that version 1.7 is currently the target of the /usr/bin/java link. This mediation does not specify the preferred implementation, and the package system selected the implementation with the higher version as the preferred implementation.

$ pkg mediator -a java
MEDIATOR VER. SRC. VERSION IMPL. SRC. IMPLEMENTATION
java     system    1.7     system
java     system    1.6     system

The following command shows setting version 1.6 as the preferred implementation. This means that invoking /usr/bin/java will invoke JRE version 1.6. JRE version 1.7 is still available on the system when users specify the full path to that version. Compare the output of the two pkg mediator commands.

$ pkg mediator java
MEDIATOR VER. SRC. VERSION IMPL. SRC. IMPLEMENTATION
java     system    1.7     system
$ pfexec pkg set-mediator -V 1.6 java
            Packages to update:  3
           Mediators to change:  1
       Create boot environment: No
Create backup boot environment: No

PHASE                                          ITEMS
Removing old actions                             2/2
Updating modified actions                        3/3
Updating image state                            Done
Creating fast lookup database                   Done
Reading search index                            Done
Updating search index                            3/3
$ pkg mediator java
MEDIATOR VER. SRC. VERSION IMPL. SRC. IMPLEMENTATION
java     local     1.6     system