Skip Navigation Links | |
Exit Print View | |
Adding and Updating Oracle Solaris 11.1 Software Packages Oracle Solaris 11.1 Information Library |
1. Introduction to the Image Packaging System
2. IPS Graphical User Interfaces
3. Getting Information About Software Packages
4. Installing and Updating Software Packages
Installing and Updating Packages
Installing a Package into a New Boot Environment
Installing Packages in Non-Global Zones
An example of a problem that could occur after a package is installed is that a file delivered by the package becomes corrupted. In the example shown in this section, the /usr/share/auto_install/manifest/default.xml file has been deleted.
Use the pkg search command to determine which package delivered the missing file:
$ pkg search -Hlo pkg.name /usr/share/auto_install/manifest/default.xml system/install/auto-install/auto-install-common
Use the pkg verify command to validate the installation of packages in the current image.
/usr/bin/pkg verify [-Hqv] [pkg_fmri_pattern ...]
If current signature policy for related publishers is not ignore, the signatures of each package are validated based on policy. See signature-policy in Properties for Signing Packages for an explanation of how signature policies are applied.
Use the -H option to omit the headers from the verification output. Use the -q option to print nothing but return failure if any fatal errors are found. Use the -v option to include informational messages regarding packages.
$ pfexec pkg verify -v system/install/auto-install/auto-install-common PACKAGE STATUS pkg://solaris/system/install/auto-install/auto-install-common ERROR file: usr/share/auto_install/manifest/default.xml Missing: regular file does not exist
Use the pkg fix command to fix package installation errors reported by the pkg verify command.
/usr/bin/pkg fix [--accept] [--licenses] [pkg_fmri_pattern ...]
Verification of installed package content is based on a custom content analysis that might return different results than those of other programs.
Use the --accept option to indicate that you agree to and accept the terms of the licenses of the packages that are updated or installed. If you do not provide this option, and any package licenses require acceptance, the fix operation fails. Use the --licenses option to display all of the licenses for the packages that are updated as part of this operation.
$ pfexec pkg fix --accept system/install/auto-install/auto-install-common Verifying: pkg://solaris/system/install/auto-install/auto-install-common ERROR file: usr/share/auto_install/manifest/default.xml Missing: regular file does not exist Created ZFS snapshot: 2012-08-06-23:32:03 Repairing: pkg://solaris/system/install/auto-install/auto-install-common Creating Plan (Evaluating mediators): DOWNLOAD PKGS FILES XFER (MB) SPEED Completed 1/1 1/1 0.0/0.0 0B/s PHASE ITEMS Updating modified actions 1/1 Updating image state Done Creating fast lookup database Done
Use the pkg revert command to restore files to their as-delivered condition.
/usr/bin/pkg revert [-nv] [--no-be-activate] [--no-backup-be | --require-backup-be] [--backup-be-name name] [--deny-new-be | --require-new-be] [--be-name name] (--tagged tag-name ... | path-to-file ...)
Either all files tagged with a particular tag-name, or individual files can be reverted. File ownership and protections are also restored.
Caution - Reverting some editable files to their default values can make the system unbootable, or cause other malfunctions. |
In the following example, a sample system configuration file that has been changed is restored to its original content.
$ pfexec pkg revert /usr/share/auto_install/sc_profiles/static_network.xml Packages to update: 1 Create boot environment: No Create backup boot environment: No DOWNLOAD PKGS FILES XFER (MB) SPEED Completed 1/1 1/1 0.0/0.0 0B/s PHASE ITEMS Updating modified actions 1/1 Updating image state Done Creating fast lookup database Done