summaryrefslogtreecommitdiffstats
path: root/rpminfo.c
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2025-07-18 15:25:21 +0200
committerRemi Collet <remi@php.net>2025-07-18 15:25:21 +0200
commit4a4a669084f8b1ccb566d2fed8a1aa13898fc436 (patch)
treee12277f3c93ed2354ab2338e76aaaef9028ada70 /rpminfo.c
parente6e53c4c88240ac571a6667315dcf04e616f47d2 (diff)
use RPMTAG_SIGMD5 instead of RPMTAG_PKGID, RPMTAG_SHA1HEADER instead of RPMTAG_HDRID
Diffstat (limited to 'rpminfo.c')
-rw-r--r--rpminfo.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/rpminfo.c b/rpminfo.c
index 0d17abf..a32a45a 100644
--- a/rpminfo.c
+++ b/rpminfo.c
@@ -403,22 +403,18 @@ PHP_FUNCTION(rpmdbsearch)
tid = atol(name);
name = (char *)&tid;
len = sizeof(tid);
-#ifdef RPMTAG_PKGID
- } else if (crit == RPMTAG_PKGID) {
+ } else if (crit == RPMTAG_SIGMD5) {
if (len != 32) {
- zend_argument_value_error(1, "Bad length for PKGID, 32 expected");
+ zend_argument_value_error(1, "Bad length for PKGID/SIGMD5, 32 expected");
RETURN_THROWS();
}
len = hex2bin(name, MD5, len);
name = MD5;
-#endif
-#ifdef RPMTAG_HDRID
- } else if (crit == RPMTAG_HDRID) {
+ } else if (crit == RPMTAG_SHA1HEADER) {
if (len != 40) {
- zend_argument_value_error(1, "Bad length for HDRID, 40 expected");
+ zend_argument_value_error(1, "Bad length for HDRID/SHA1HEADER, 40 expected");
RETURN_THROWS();
}
-#endif
} else if (crit == RPMTAG_INSTFILENAMES) {
/* use input parameters */
} else {