Skip Navigation Links | |
Exit Print View | |
Application Packaging Developer's Guide Oracle Solaris 11 Express 11/10 |
3. Enhancing the Functionality of a Package (Tasks)
4. Verifying and Transferring a Package
Verifying and Transferring a Package (Task Map)
The Installation Software Database
Interacting With the pkgadd Command
Installing Packages on Standalone Systems or Servers in a Homogeneous Environment
How to Install a Package on a Standalone System or Server
Displaying Additional Information About Installed Packages
How to Obtain Information With the pkgparam Command
Customizing the Format of the pkginfo Display
Parameter Descriptions for the pkginfo Long Format
How to Obtain Information With the pkginfo Command
Transferring a Package to a Distribution Medium
How to Transfer a Package to a Distribution Medium
5. Case Studies of Package Creation
The pkgchk command enables you to check the integrity of packages, whether they are installed on a system or in package format (ready to be installed with the pkgadd command). It confirms package structure or the installed files and directories, or displays information about package objects. The pkgchk command can list or check the following:
The package installation scripts.
The contents or attributes, or both, of objects currently installed on the system.
The contents of a spooled, uninstalled package.
The contents or attributes, or both, of objects described in the specified pkgmap file.
For more information about this command, refer to pkgchk(1M).
The pkgchk command performs two kinds of checks. It checks file attributes (the permissions and ownership of a file and major/minor numbers for block or character special devices) and the file contents (the size, checksum, and modification date). By default, the command checks both the file attributes and the file contents.
The pkgchk command also compares the file attributes and contents of the installed package against the installation software database. The entries concerning a package may have been changed since the time of installation; for example, another package may have changed a package component. The database reflects that change.
See How to Install a Package on a Standalone System or Server, if needed.
# pkgchk [-v] [-R root-path] [pkg-abbrev...]
|
Example 4-2 Verifying the Integrity of a Package
This example shows the command you should use to verify the integrity of an installed package.
$ pkgchk pkg-abbrev $
If there are errors, the pkgchk command prints them. Otherwise, it does not print anything and returns an exit code of 0. If you do not supply a package abbreviation, then it will check all of the packages on the system.
Alternately, you could use the -v option, which will print a list of files in the package if there are no errors. For example:
$ pkgchk -v SUNWcadap /opt/SUNWcadap /opt/SUNWcadap/demo /opt/SUNWcadap/demo/file1 /opt/SUNWcadap/lib /opt/SUNWcadap/lib/file2 /opt/SUNWcadap/man /opt/SUNWcadap/man/man1 /opt/SUNWcadap/man/man1/file3.1 /opt/SUNWcadap/man/man1/file4.1 /opt/SUNWcadap/man/windex /opt/SUNWcadap/srcfiles /opt/SUNWcadap/srcfiles/file5 /opt/SUNWcadap/srcfiles/file6 $
If you need to verify a package that is installed on a client system's root file system, use this command:
$ pkgchk -v -R root-path pkg-abbrev
If you are ready to go to the next task, see How to Obtain Information With the pkginfo Command.