PHP.nl

rpminfo

rpminfo

Get information from a RPM file

 **rpminfo** string $path bool $full string $error

Retrieve information about a local file, a RPM package.

pathPath of the RPM file.

fullIf true all information headers for the file are retrieved, else only a minimal set.

errorIf provided, will receive the possible error message, and will avoid a runtime warning.

An of information, or null on error. array

Voorbeeld: A example

<?php
rpmaddtag(RPMTAG_BUILDTIME);
$info = rpminfo("./php-pecl-rpminfo-0.4.2-1.el8.remi.7.4.x86_64.rpm");
print_r($info);
?>
Array
(
    [Name] => php-pecl-rpminfo
    [Version] => 0.4.2
    [Release] => 1.el8
    [Summary] => RPM information
    [Buildtime] => 1586244821
    [Arch] => x86_64
)

rpmaddtag