Solaris Express Installation Guide: Custom JumpStart and Advanced Installations

Verifying Packages

All packages must pass pkgchk validation. After a package is created and before it is installed, it must be checked with the following command.


# pkgchk -d dir_name pkg_name
dir_name

Specifies the name of the directory where the package resides

pkg_name

Specifies the name of the package


Example B–1 Testing a Package

After a package is created, it must be tested by installing it in an alternate root (/) file system location by using the -R dir_name option to pkgadd. After the package is installed, it must be checked for correctness by using pkgchk, as in this example.


# pkgadd -d . -R /a SUNWvxvm
# pkgchk -R /a SUNWvxvm

No errors should be displayed.



Example B–2 Testing a Package on /export/SUNWvxvm

If a package exists at /export/SUNWvxvm, then you would issue the following command.


# pkgchk -d /export SUNWvxvm

No errors should be displayed.


Other commands can check the package when you are creating, modifying, and deleting files. The following commands are some examples.


# TEMPDIR=/a; export TEMPDIR
# truss -t open /usr/sbin/pkgadd -R ${TEMPDIR} SUNWvxvm \
2>&1 > /dev/null | grep -v O_RDONLY | grep -v \
'open("'${TEMPDIR}