array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'de', ), 'this' => array ( 0 => 'function.rpminfo.php', 1 => 'rpminfo', ), 'up' => array ( 0 => 'ref.rpminfo.php', 1 => 'RpmInfo Funktionen', ), 'prev' => array ( 0 => 'function.rpmgetsymlink.php', 1 => 'rpmgetsymlink', ), 'next' => array ( 0 => 'function.rpmvercmp.php', 1 => 'rpmvercmp', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/rpminfo/functions/rpminfo.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL rpminfo >= 0.1.0)
rpminfo — Get information from a RPM file
Retrieve information about a local file, a RPM package.
path
Path of the RPM file.
full
If true
all information headers for the file are retrieved, else only a minimal set.
error
If provided, will receive the possible error message, and will avoid a runtime warning.
An array of information or NULL on error.
Beispiel #1 A rpminfo() example
<?php
rpmaddtag(RPMTAG_BUILDTIME);
$info = rpminfo("./php-pecl-rpminfo-0.4.2-1.el8.remi.7.4.x86_64.rpm");
print_r($info);
?>
Das oben gezeigte Beispiel erzeugt folgende Ausgabe:
Array ( [Name] => php-pecl-rpminfo [Version] => 0.4.2 [Release] => 1.el8 [Summary] => RPM information [Buildtime] => 1586244821 [Arch] => x86_64 )