Solaris patch exit codes and what they mean

This isn't my work; it's from a comment on an earlier entry . I'm repeating it here partly to have it handy, and partly because DWiki mangled the nice clear plain ASCII formatting of the original. So thank you, mostly anonymous commenter.

The following are the explanation of patchdd script exit codes:

0No error
1Usage error
2Attempt to apply a patch that's already been applied
3Effective UID is not root
4Attempt to save original files failed
5pkgadd failed
6Patch is obsoleted
7Invalid package directory
8Attempting to patch a package that is not installed
9Cannot 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
14NOT USED
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
34Incorrect patch spool directory
35Later revision already installed
36Cannot create safe temporary directory
37Illegal backout directory specified
38A prepatch, prePatch or a postpatch script could not be executed

Why this information is not in the CLUSTER_README I don't know. It appears to be in some patch cluster READMEs, but not the Solaris 9 recommended patch set one. Yet another Sun mystery, I suppose.

(PS: the formatting on this may not look so great in syndication feeds, including LiveJournal. Explaining the mess of why requires a larger rant than this margin has space for.)