Solaris::Patchdiag - Patchdiag class file
use Solaris::Patchdiag; $pd=Solaris::Patchdiag::new(-file => $filename);
Solaris::Patchdiag is a class for accessing the content of the patchdiag.xref file, which is a file Sun puts out to list patches available for the Solaris operating system.
An instance method of the class reads in the file, and accessor methods allow programs to obtain information about the patches, such as what OS version the patch is for, and what packages the patch is applied to.
$pd=Solaris::Patchdiag::new(-file => $filename);
The new method can accept a file paramter to specify what patchdiag.xref file it should read. If no file is specified, the object will look for a patchdiag.xref file in the current directory.
Each of the above methods access fields within the file for a specified patch. To find out what operating system release patch ID 108832 is for, you would use
Returns the name of the patchdiag.xref file being referenced
Returns a list of all patches in the patchdiag.xref file
Returns a hash table with all of the data for a particular patch
Each of the above methods returns an array list of patches with the appropriate flag set. For example, to get a list of all of the security classified patches, use
Returns an array of all the patches that modify a package in a specific OS Release
The patchdiag.xref file is a REALLY awkward file format, and the fact that it isn't really documented doesn't help much. I'm only interpreting it based on the source code of the patchdiag.pl program and from observation.
The "arch" field apparantly lists architectures supported by the patch, AND prerequisite patches that need to be installed beforehand.
The "flag" fields contain a space when empty, which technically wastes space.
The "y2k" field can contain either a "Y" or a "B", and the original patchdiag.pl program checks for the possibility of a "YB" value as well. I have no idea what the differences are, so I just report the flag as set if either character is present.
The "osRelease" field specifies the Solaris OS release name, which involves some munging, and it makes no sense at times. Why report "7_x86" in one field, when you already report the platform architecture in another? Maybe it's really a Solaris naming convention issue.
Chris Josephes, email@example.com
The patchdiag(1m) manpage.