summaryrefslogtreecommitdiffstats
path: root/rpminfo.c
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2025-07-18 14:41:27 +0200
committerRemi Collet <remi@php.net>2025-07-18 14:50:46 +0200
commit6f92494506e97d8e347eb1064977d79251f10a79 (patch)
treef003db71cd28495ed01011c1feedf36da977d4f5 /rpminfo.c
parent7c3b8d70e6aae14ed8031d5790f912387b7bce89 (diff)
RPMTAG_PKGID and RPMTAG_HDRID removed in RPM 6
Diffstat (limited to 'rpminfo.c')
-rw-r--r--rpminfo.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/rpminfo.c b/rpminfo.c
index ae8b8e7..0d17abf 100644
--- a/rpminfo.c
+++ b/rpminfo.c
@@ -399,22 +399,26 @@ PHP_FUNCTION(rpmdbsearch)
RETURN_THROWS();
}
- if (crit == RPMTAG_PKGID) {
+ if (crit == RPMTAG_INSTALLTID) {
+ tid = atol(name);
+ name = (char *)&tid;
+ len = sizeof(tid);
+#ifdef RPMTAG_PKGID
+ } else if (crit == RPMTAG_PKGID) {
if (len != 32) {
zend_argument_value_error(1, "Bad length for PKGID, 32 expected");
RETURN_THROWS();
}
len = hex2bin(name, MD5, len);
name = MD5;
+#endif
+#ifdef RPMTAG_HDRID
} else if (crit == RPMTAG_HDRID) {
if (len != 40) {
zend_argument_value_error(1, "Bad length for HDRID, 40 expected");
RETURN_THROWS();
}
- } else if (crit == RPMTAG_INSTALLTID) {
- tid = atol(name);
- name = (char *)&tid;
- len = sizeof(tid);
+#endif
} else if (crit == RPMTAG_INSTFILENAMES) {
/* use input parameters */
} else {