Solaris::Package - Perl module to obtain basic Solaris Package Info
use Solaris::Package; $x=Solaris::Package::new(-directory => "/tmp/install", -file => "SUNWm64.u");
Solaris::Package is a class module that reads in the information from a pkginfo file for a Solaris package. It can be spawned from a Solaris::InstallDB object, or it can be used as a standalone object.
The -directory arguement specifies what package directory to search in, the -file directory points to the directory name the package is in.
Optionally, you can specify a pointer to a Solaris::InstallDB object by using the -installDB arguement.
Two points to clarify:
This object only works on Solaris packages in the directory format, not the data stream format, so the -file arguement is really specifying a filesystem directory.
The name of a package is not necessarily the same as the name of the file of the package. The SUNWm64 example at the beginning of this documentation is an example of a package with a different directory name.
Each of these methods returns their corresponding pkginfo parameter. Note that patchList() returns an array type, with each element listing a single patch. The pkVersion() method returns the package version, and should not be confused with the version() method.
Returns a simplified output similar to the "pkginfo" command, but does not report filesystem contents. That can be achieved by using the Solaris::Contents object.
Returns a hash table with every parameter in the pkginfo file and every corresponding value
Chris Josephes, firstname.lastname@example.org
The pkginfo(4) manpage.