aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-06-17 15:54:02 +0000
committerFrancois Pons <fpons@mandriva.com>2003-06-17 15:54:02 +0000
commit73d007af3b817a8da95e0f8ccf4765d17dc3fc5b (patch)
treefda4a28e97d066a820b13a52e2dc095413ccb4d7 /URPM.xs
parent6cf39e1513cb12cbf071c6ad86fa47cbf86500bc (diff)
downloadperl-URPM-73d007af3b817a8da95e0f8ccf4765d17dc3fc5b.tar
perl-URPM-73d007af3b817a8da95e0f8ccf4765d17dc3fc5b.tar.gz
perl-URPM-73d007af3b817a8da95e0f8ccf4765d17dc3fc5b.tar.bz2
perl-URPM-73d007af3b817a8da95e0f8ccf4765d17dc3fc5b.tar.xz
perl-URPM-73d007af3b817a8da95e0f8ccf4765d17dc3fc5b.zip
fixed compilation on rpm 4.0.4.
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs12
1 files changed, 12 insertions, 0 deletions
diff --git a/URPM.xs b/URPM.xs
index 8f48b1b..e7321e8 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -561,7 +561,11 @@ return_files(Header header, int filter_mode) {
}
void
+#ifdef RPM_42
return_problems(rpmps ps, int translate_message) {
+#else
+return_problems(rpmProblemSet ps, int translate_message) {
+#endif
dSP;
if (ps && ps->probs && ps->numProblems > 0) {
int i;
@@ -3132,6 +3136,7 @@ Urpm_verify_rpm(filename, ...)
if (fdFileno(fd) < 0) {
RETVAL = "Couldn't open file";
} else {
+#ifdef RPM_42
if (db) {
ts = db->ts;
} else {
@@ -3141,6 +3146,7 @@ Urpm_verify_rpm(filename, ...)
rpmtsSetRootDir(ts, "/");
rpmtsOpenDB(ts, O_RDONLY);
}
+#endif
memset(&lead, 0, sizeof(lead));
if (readLead(fd, &lead)) {
@@ -3331,7 +3337,11 @@ Urpm_verify_rpm(filename, ...)
#endif
b = stpcpy(b, "(MD5) (PGP) ");
if (tempKey) {
+#ifdef RPM_42
if (res3 == RPMRC_NOKEY)
+#else
+ if (res3 == RPMSIG_NOKEY)
+#endif
b = stpcpy(b, "(MISSING KEY) ");
else
b = stpcpy(b, "(UNTRUSTED KEY) ");
@@ -3434,8 +3444,10 @@ Urpm_verify_rpm(filename, ...)
unlink(tmpfile);
#endif
sigh = rpmFreeSignature(sigh);
+#ifdef RPM_42
rpmtsCleanDig(ts);
if (!db) rpmtsFree(ts);
+#endif
}
fdClose(fd);
}