RPM4::Header
The header contains informations about a rpms, this object give methods to manipulate its.
Create a new RPM4::Header instance from:
if $item is an rpm file, returns the corresponding object.
if $item is a file handler, returns an object corresponding to the next header there.
if $item is omitted, returns an empty object.
If data are unreadable for whatever reason, returns undef.
Dump header data into file handle.
Warning: Perl modifier (like PerlIO::Gzip) won't works.
Returns the on-disk size of header data, in bytes.
Returns a RPM4::Header object copy.
Remove tag 'tagid' from header.
Add a tag into the header: - tagid is the integervalue of tag - tagtype is an integer, it identify the tag type to add (see rpmlib headers files). Other argument are value to put in tag.
Returns a list of tag id present in header.
Returns true if tag 'tagid' is present in header.
Ex: $header->hastag(1000); # Returns true if tag 'NAME' is present.
Returns the tagtype value of tagid. Returns 0 if tagid is not found.
Returns array of tag value for tag 'tagid'.
$header->tag(1000); # return the name of rpm header.
Make a formated query on the header, macros in $query are evaluated. This function works like rpm --queryformat ...
rpm --queryformat ...
$header->queryformat("%{NAME}-%{VERSION}-%{RELEASE}");
In scalar context return the "name-version-version.arch" of package. In array context return (name, version, release, arch) of package.
Returns true if package is a source package.
Compare the header to another, return 1 if the object is higher, -1 if header passed as argument is better, 0 if update is not possible.
Return a RPM4::Header::Dependencies object containing dependencies of type $deptype found in the header.
Return a RPM4::Header::Files object containing the set of files include in the rpm.
RPM4
To install RPM4, copy and paste the appropriate command in to your terminal.
cpanm
cpanm RPM4
CPAN shell
perl -MCPAN -e shell install RPM4
For more information on module installation, please visit the detailed CPAN module installation guide.