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

Avoiding Installing Some Packages in a Group Package

Use the pkg avoid command to avoid installing specified packages if they are the target of a group dependency. You can always explicitly install a package that is compatible with the image, even if that package is on the avoid list. Installing a package that is on the avoid list removes that package from the avoid list. The pkg avoid command enables you to avoid installing specified packages that are part of a group package when you install that group package.

/usr/bin/pkg avoid [pkg_fmri_pattern ...]

With no arguments, the pkg avoid command displays each avoided package along with any packages that have a group dependency on that package.

With pkg_fmri_pattern specified, the pkg avoid command places the package names that currently match the specified patterns on the avoid list. Only packages that are not currently installed can be avoided. If a package is currently the target of a group dependency, uninstalling the package places it on the avoid list.

If a package is on the avoid list, installing it removes it from that list. Packages that are on the avoid list are installed if needed to satisfy a require dependency. If that dependency is removed, the package is uninstalled.

Use the pkg unavoid command to remove the specified packages from the avoid list.

/usr/bin/pkg unavoid [pkg_fmri_pattern ...]

Packages on the avoid list that match an installed package's group dependency cannot be removed from the avoid list using this subcommand. To remove a package from the avoid list that matches a group dependency, install the package.

The following command output shows that the group/feature/amp group package is not installed, and none of the packages that are part of that group package are installed. Some of these packages could have been installed explicitly or as require dependencies of other packages.

$ pkg list -a group/feature/amp
NAME (PUBLISHER)     VERSION                    IFO
group/feature/amp    0.5.11-0.175.1.0.0.21.0    ---
$ pkg list -a `pkg contents -o fmri -H -rt depend -a type=group group/feature/amp`
NAME (PUBLISHER)                             VERSION                  IFO
database/mysql-51                            5.1.37-0.175.1.0.0.21.0  ---
web/php-52                                   5.2.17-0.175.1.0.0.21.0  ---
web/php-52/extension/php-apc                 3.0.19-0.175.1.0.0.21.0  ---
web/php-52/extension/php-mysql               5.2.17-0.175.1.0.0.21.0  ---
web/server/apache-22                         2.2.22-0.175.1.0.0.21.0  ---
web/server/apache-22/module/apache-dtrace    0.3.1-0.175.1.0.0.21.0   ---
web/server/apache-22/module/apache-fcgid     2.3.6-0.175.1.0.0.21.0   ---
web/server/apache-22/module/apache-php5      5.2.17-0.175.1.0.0.18    --r

The following command places one of the packages that belongs to this group package on the avoid list. The group package is not noted on the avoid list because the group package is not installed.

$ pfexec pkg avoid web/server/apache-22/module/apache-fcgid
$ pkg avoid
    web/server/apache-22/module/apache-fcgid

The following commands show that the avoided package is not installed when the group package is installed. After the group package is installed, the group package is noted on the avoid list.

$ pfexec pkg install group/feature/amp
...
$ pkg list -a `pkg contents -o fmri -H -rt depend -a type=group group/feature/amp`
NAME (PUBLISHER)                             VERSION                  IFO
database/mysql-51                            5.1.37-0.175.1.0.0.21.0  i--
web/php-52                                   5.2.17-0.175.1.0.0.21.0  i--
web/php-52/extension/php-apc                 3.0.19-0.175.1.0.0.21.0  i--
web/php-52/extension/php-mysql               5.2.17-0.175.1.0.0.21.0  i--
web/server/apache-22                         2.2.22-0.175.1.0.0.21.0  i--
web/server/apache-22/module/apache-dtrace    0.3.1-0.175.1.0.0.21.0   i--
web/server/apache-22/module/apache-fcgid     2.3.6-0.175.1.0.0.21.0   ---
web/server/apache-22/module/apache-php5      5.2.17-0.175.1.0.0.18    i-r
$ pkg avoid
    web/server/apache-22/module/apache-fcgid (group dependency of 'group/feature/amp')

The pkg unavoid command does not remove a package from the avoid list if that package is part of an installed group package. To remove such a package from the avoid list, install the package.

$ pfexec pkg unavoid web/server/apache-22/module/apache-fcgid
pkg unavoid: The following packages are a target of group dependencies; use install to unavoid these:
    web/server/apache-22/module/apache-fcgid
$ pfexec pkg install web/server/apache-22/module/apache-fcgid
$ pkg avoid
$

You cannot place a package on the avoid list if that package is already installed. The package is placed on the avoid list if you uninstall the package.

$ pfexec pkg avoid web/server/apache-22/module/apache-fcgid
pkg avoid: The following packages are already installed in this image; use uninstall to avoid these:
    web/server/apache-22/module/apache-fcgid
$ pfexec pkg uninstall web/server/apache-22/module/apache-fcgid
...
$ pkg avoid
    web/server/apache-22/module/apache-fcgid (group dependency of 'group/feature/amp')

Uninstalling a package that is part of a group package automatically places that package on the avoid list.

$ pfexec pkg uninstall database/mysql-51
$ pkg avoid
    database/mysql-51 (group dependency of 'group/feature/amp')
    web/server/apache-22/module/apache-fcgid (group dependency of 'group/feature/amp')

If the group package is uninstalled, the avoided packages remain on the avoid list, but the avoid list no longer notes their association with the group package.

$ pfexec pkg uninstall group/feature/amp
$ pkg avoid
    database/mysql-51
    web/server/apache-22/module/apache-fcgid
$ pfexec pkg unavoid database/mysql-51 web/server/apache-22/module/apache-fcgid
$ pkg avoid
$