1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
fix rpm5 build
8/19/2010 - created by Qing He <qing.he@intel.com>
diff --git a/ext/repo_rpmdb.c b/ext/repo_rpmdb.c
index 34f2b65..3c6ab9a 100644
--- a/ext/repo_rpmdb.c
+++ b/ext/repo_rpmdb.c
@@ -21,10 +21,11 @@
#include <string.h>
#include <unistd.h>
#include <assert.h>
+#include <stdint.h>
#include <rpm/rpmio.h>
#include <rpm/rpmpgp.h>
-#include <rpm/header.h>
+//#include <rpm/header.h>
#include <rpm/rpmdb.h>
#ifndef DB_CREATE
@@ -2466,7 +2467,7 @@ rpm_byrpmh(Header h, void **statep)
int sigdsize, sigcnt, l;
RpmHead *rpmhead;
- uh = headerUnload(h);
+ uh = headerUnload(h, NULL);
if (!uh)
return 0;
sigcnt = getu32(uh);
@@ -2982,7 +2983,7 @@ pubkey2solvable(Solvable *s, Repodata *data, char *pubkey)
parsekeydata(s, data, pkts, pktsl);
/* only rpm knows how to do the release calculation, we don't dare
* to recreate all the bugs */
- dig = pgpNewDig();
+ dig = pgpDigNew(0);
(void) pgpPrtPkts(pkts, pktsl, dig, 0);
btime = dig->pubkey.time[0] << 24 | dig->pubkey.time[1] << 16 | dig->pubkey.time[2] << 8 | dig->pubkey.signid[3];
sprintf(evrbuf, "%02x%02x%02x%02x-%02x%02x%02x%02x", dig->pubkey.signid[4], dig->pubkey.signid[5], dig->pubkey.signid[6], dig->pubkey.signid[7], dig->pubkey.time[0], dig->pubkey.time[1], dig->pubkey.time[2], dig->pubkey.time[3]);
@@ -2996,7 +2997,7 @@ pubkey2solvable(Solvable *s, Repodata *data, char *pubkey)
repodata_set_str(data, s - s->repo->pool->solvables, PUBKEY_KEYID, keyid);
if (dig->pubkey.userid)
setutf8string(data, s - s->repo->pool->solvables, SOLVABLE_SUMMARY, dig->pubkey.userid);
- pgpFreeDig(dig);
+ (void) pgpDigFree(dig, "");
sat_free((void *)pkts);
return 1;
}
|