rpmdbsearch
rpmdbsearch
Search RPM packages
**rpmdbsearch** string $pattern int $rpmtag int $rpmmire bool $full
Search packages in the system RPM database.
patternValue to search for.
rpmtag
Search criterion, which is one of the
constants.
RPMTAG_*
rpmmire
Pattern type, which is one of the
constants.
When < 0 the criterion must equal the value, and database index is used if possible.
RPMMIRE_*
fullIf true all information headers for the file are retrieved, else only a minimal set.
An of of information, or null on error.
array``array
Voorbeeld: Searching for the package owning a file
<?php
$info = rpmdbsearch("/usr/bin/php", RPMTAG_INSTFILENAMES);
print_r($info);
?>
Array
(
[0] => Array
(
[Name] => php-cli
[Version] => 7.4.4
[Release] => 1.fc32
[Summary] => Command-line interface for PHP
[Arch] => x86_64
)
)
rpmaddtag