Chris Josephes > sol-inst > Solaris::Patchdiag

Download:
sol-inst-0.90a.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.9   Source  

NAME ^

Solaris::Patchdiag - Patchdiag class file

SYNOPSIS ^

use Solaris::Patchdiag; $pd=Solaris::Patchdiag::new(-file => $filename);

DESCRIPTION ^

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.

CONSTRUCTOR METHOD ^

$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.

OBJECT METHODS ^

rev($id)
releaseDate($id)
recommendedFlag($id)
securityFlag($id)
obsoleteFlag($id)
y2kFlag($id)
osRelease($id)
arch($id)
pkgs($id)
synopsis($id)

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

 $os=$pd->osRelease(108832);
file()

Returns the name of the patchdiag.xref file being referenced

list()

Returns a list of all patches in the patchdiag.xref file

entry($id)

Returns a hash table with all of the data for a particular patch

recommendedList()
securityList()
obsoleteList()
y2kList()

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

 (@secpatches)=$pd->securityList();
patchesFor($pkg,$osRelease)

Returns an array of all the patches that modify a package in a specific OS Release

NOTES ^

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.

AUTHOR ^

Chris Josephes, chrisj@onvoy.com

SEE ALSO ^

The patchdiag(1m) manpage.

syntax highlighting: