summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-03-11 15:31:48 +0100
committerRemi Collet <remi@remirepo.net>2020-03-11 15:31:48 +0100
commitdb270c6c4667957045127ad04af206ce48e9a5c8 (patch)
treed11a4957179e9c969fc5eab53183d55e83950889 /README.md
parent2e3e6f8220d68a5e62197d51aed16a3e08da223b (diff)
add match_mode parameters to rpmdbinfo function
allowing to search packages with name matching a glob or a regex
Diffstat (limited to 'README.md')
-rw-r--r--README.md69
1 files changed, 67 insertions, 2 deletions
diff --git a/README.md b/README.md
index 9461c22..8d42ae9 100644
--- a/README.md
+++ b/README.md
@@ -97,12 +97,77 @@ The return value is an array of hash tables, or false if it fails.
[0] => Array
(
[Name] => php
- [Version] => 7.2.2
- [Release] => 1.fc27.remi
+ [Version] => 7.3.5
+ [Release] => 1.fc31.remi
+ [Summary] => PHP scripting language for creating dynamic web sites
[Arch] => x86_64
)
)
+Retrieve information from rpm database about installed packages using glob or regex.
+The return value is an array of hash tables, or false if it fails.
+
+ $ php -a
+ php > print_r(rpmdbinfo("php-pecl-r*", false, RPM_MATCH_GLOB));
+ Array
+ (
+ [0] => Array
+ (
+ [Name] => php-pecl-radius
+ [Version] => 1.4.0
+ [Release] => 0.10.b1.fc31
+ [Summary] => Radius client library
+ [Arch] => x86_64
+ )
+ [1] => Array
+ (
+ [Name] => php-pecl-request
+ [Version] => 1.0.0
+ [Release] => 0.11.b2.fc31.remi.7.3
+ [Summary] => Server-side request and response objects
+ [Arch] => x86_64
+ )
+ [2] => Array
+ (
+ [Name] => php-pecl-rpminfo
+ [Version] => 0.2.3
+ [Release] => 1.fc31.remi.7.3
+ [Summary] => RPM information
+ [Arch] => x86_64
+ )
+ )
+
+ $ php -a
+ php > print_r(rpmdbinfo("^php-pecl-r", false, RPM_MATCH_REGEX));
+ Array
+ (
+ [0] => Array
+ (
+ [Name] => php-pecl-radius
+ [Version] => 1.4.0
+ [Release] => 0.10.b1.fc31
+ [Summary] => Radius client library
+ [Arch] => x86_64
+ )
+ [1] => Array
+ (
+ [Name] => php-pecl-request
+ [Version] => 1.0.0
+ [Release] => 0.11.b2.fc31.remi.7.3
+ [Summary] => Server-side request and response objects
+ [Arch] => x86_64
+ )
+ [2] => Array
+ (
+ [Name] => php-pecl-rpminfo
+ [Version] => 0.2.3
+ [Release] => 1.fc31.remi.7.3
+ [Summary] => RPM information
+ [Arch] => x86_64
+ )
+ )
+
+
----
# LICENSE