Solaris Patch Return Codes - patchadd

When adding patches to a solaris box you sometimes get these error messages esp. 2 and 8 and sometimes 5 and 25. Here's what they all mean.

Exit codeMeaning
0 No error
1 Usage error
2 Attempt to apply a patch that's already been applied
3 Effective UID is not root
4 Attempt to save original files failed
5 pkgadd failed
6 Patch is obsoleted
7 Invalid package directory
8 Attempting to patch a package that is not installed
9 Cannot access /usr/sbin/pkgadd (client problem)
10Package validation errors
11Error adding patch to root template
12Patch script terminated due to signal
13Symbolic link included in patch
15The prepatch script had a return code other than 0.
16The postpatch script had a return code other than 0.
17Mismatch of the -d option between a previous patch install and the current one.
18Not enough space in the file systems that are targets of the patch.
19$SOFTINFO/INST_RELEASE file not found
20A direct instance patch was required but not found
21The required patches have not been installed on the manager
22A progressive instance patch was required but not found
23A restricted patch is already applied to the package
24An incompatible patch is applied
25A required patch is not applied
26The user specified backout data can't be found
27The relative directory supplied can't be found
28A pkginfo file is corrupt or missing
29Bad patch ID format
30Dryrun failure(s)
31Path given for -C option is invalid
32Must be running Solaris 2.6 or greater
33Bad formatted patch file or patch file not found
34The appropriate kernel jumbo patch needs to be installed
35Later revision already installed
36Cannot create safe temporary directory
37Illegal backout directory specified
38A prepatch, prePatch or a postpatch script could not be executed
39A compressed patch was unable to be decompressed
40Error downloading a patch
41Error verifying signed patch
42Error unable to retrieve patch information from SQL DB
43Error unable to update the SQL DB
44Lock file not available
45Unable to copy patch data to partial spool directory.