Application Packaging Developer's Guide

How to Verify the Integrity of Your Package

  1. Install your package.

    See "How to Install a Package on a Standalone or Server" or "How to Add a Package to a Diskless or AutoClient System's Root File System", if needed.

  2. Verify the integrity of your package.


    # pkgchk  [-v] [-R root-path] [pkg-abbrev...]

    -v

    Lists files as they are processed. 

    -R root-path

    Specifies the location of the client system's root file system. 

    pkg-abbrev

    Is the name of one or more packages (separated by spaces) to be checked. If omitted, pkgchk checks all available packages.

Where to Go Next

If you are ready to go to the next task, see "How to Obtain Information With the pkginfo Command".

Example--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