patchdiag.xref file is the
patch index file used by various tools, Sun and otherwise, such as the
marvelous pca. Here's what I've worked out about its
format, much of which comes from reading pca's source code.
Any line starting with a '
#' is a comment. In practice, they seem to come
only at the start of the file and start with '
##', but I wouldn't count on
Each patch is one line, with fields separated by '
|', and appears
to be ordered by increasing patch number, although I wouldn't count on
that. The fields are, in order:
||patch ID, usually a six-digit number|
||the patch's revision, usually a two-digit number|
||the issue date of the patch, as Mon/DD/YY.|
||The first character is '
||applicable operating system version, or '
||the machine architectures that the patch is for, plus prerequisite patches.|
||the packages that this patch affects/requires, plus incompatible patches.|
||Human readable (hopefully) patch synopsis.|
os field also sometimes bundles the architecture in, so you will
see things like an OS of '
8_x86' for Solaris 8 on x86, versus just
8' for Solaris 8 SPARC.
pkgs fields contains subvalues; each subvalue ends
with a '
;', even if it is the last (or the only) subvalue in the
field. (This helpfully mucks up pretty much any language's 'split'
function; you get to split and then throw away the last element.)
Any prerequisite patches are encoded in the
archs field, as
values. Incompatible patches are slapped into the
pkgs field in the
If a patch has been obsoleted by something, its
synopsis says so.
There are a number of slightly varied formats that this information
can be in.
The subvalues in the
pkgs field (apart from incompatible patches)
are in the format 'PKG:REV', with REV in the same form that
pkginfo -x' produces it (more or less, it looks like).
The subvalues in the
archs field (apart from prerequisite patches)
may be an architecture name ('sparc' or 'i386'), '
'<arch>.<model>' such as 'sparc.sun4u'. Pca's
matching code accepts a patch if any of the subvalues match, and you'll
frequently see 'redundant'
archs values like 'sparc;sparc.sun4u;'.