RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson
Root: /v/rpm/cvs Email: jbj@rpm5.org
Module: rpm Date: 14-Oct-2007 21:05:38
Branch: HEAD Handle: 2007101420053602
Modified files:
rpm CHANGES
rpm/lib psm.c rpmchecksig.c rpmfi.c rpmfi.h
Log:
- jbj: lose the rpmfi hge/hae/hme/hre/hfd vectors.
Summary:
Revision Changes Path
1.1705 +1 -0 rpm/CHANGES
2.241 +1 -1 rpm/lib/psm.c
1.155 +10 -3 rpm/lib/rpmchecksig.c
2.85 +2 -8 rpm/lib/rpmfi.c
2.43 +0 -5 rpm/lib/rpmfi.h
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/CHANGES
============================================================================
$ cvs diff -u -r1.1704 -r1.1705 CHANGES
--- rpm/CHANGES 14 Oct 2007 18:50:24 -0000 1.1704
+++ rpm/CHANGES 14 Oct 2007 19:05:36 -0000 1.1705
@@ -1,4 +1,5 @@
4.5 -> 5.0:
+ - jbj: lose the rpmfi hge/hae/hme/hre/hfd vectors.
- jbj: yet more hge fixups.
- jbj: reqprov.c: use headerGetExtension everywhere.
- jbj: parsePreamble.c: use headerGetExtension everywhere.
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/psm.c
============================================================================
$ cvs diff -u -r2.240 -r2.241 psm.c
--- rpm/lib/psm.c 14 Oct 2007 17:06:54 -0000 2.240
+++ rpm/lib/psm.c 14 Oct 2007 19:05:37 -0000 2.241
@@ -1604,7 +1604,7 @@
const rpmts ts = psm->ts;
uint_32 tscolor = rpmtsColor(ts);
rpmfi fi = psm->fi;
- HAE_t hae = fi->hae;
+ HAE_t hae = (HAE_t) headerAddEntry;
rpmRC rc = psm->rc;
int saveerrno;
int xx;
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmchecksig.c
============================================================================
$ cvs diff -u -r1.154 -r1.155 rpmchecksig.c
--- rpm/lib/rpmchecksig.c 14 Oct 2007 01:24:05 -0000 1.154
+++ rpm/lib/rpmchecksig.c 14 Oct 2007 19:05:38 -0000 1.155
@@ -765,6 +765,12 @@
int rpmVerifySignatures(QVA_t qva, rpmts ts, FD_t fd,
const char * fn)
{
+ HGE_t hge = (HGE_t)headerGetExtension;
+ int_32 he_t = 0;
+ hRET_t he_p = { .ptr = NULL };
+ int_32 he_c = 0;
+ HE_s he_s = { .tag = 0, .t = &he_t, .p = &he_p, .c = &he_c, .freeData = 0 };
+ HE_t he = &he_s;
int res2, res3;
char result[1024];
char buf[8192], * b;
@@ -859,9 +865,10 @@
|| sigtag == RPMSIGTAG_PGP5
#endif
) {
- xx = headerGetEntry(sigh, sigtag, &sigtype, (void **)&sig, &siglen);
- xx = pgpPrtPkts(sig, siglen, dig, 0);
- sig = headerFreeData(sig, sigtype);
+ he->tag = sigtag;
+ xx = hge(sigh, he->tag, he->t, he->p, he->c);
+ xx = pgpPrtPkts(he_p.ptr, he_c, dig, 0);
+ he_p.ptr = _free(he_p.ptr);
#if defined(SUPPORT_RPMV3_VERIFY_RSA)
/* XXX assume same hash_algo in header-only and header+payload */
if ((headerIsEntry(sigh, RPMSIGTAG_PGP)
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmfi.c
============================================================================
$ cvs diff -u -r2.84 -r2.85 rpmfi.c
--- rpm/lib/rpmfi.c 13 Oct 2007 20:00:55 -0000 2.84
+++ rpm/lib/rpmfi.c 14 Oct 2007 19:05:38 -0000 2.85
@@ -691,8 +691,8 @@
int_32 he_c = 0;
HE_s he_s = { .tag = 0, .t = &he_t, .p = &he_p, .c = &he_c, .freeData = 0 };
HE_t he = &he_s;
- HAE_t hae = fi->hae;
- HME_t hme = fi->hme;
+ HAE_t hae = (HAE_t) headerAddEntry;
+ HME_t hme = (HME_t) headerModifyEntry;
static int _printed = 0;
int allowBadRelocate = (rpmtsFilterFlags(ts) & RPMPROB_FILTER_FORCERELOCATE);
rpmRelocation relocations = NULL;
@@ -1290,12 +1290,6 @@
fi->i = -1;
fi->tagN = tagN;
- fi->hge = (HGE_t) headerGetEntry;
- fi->hae = (HAE_t) headerAddEntry;
- fi->hme = (HME_t) headerModifyEntry;
- fi->hre = (HRE_t) headerRemoveEntry;
- fi->hfd = headerFreeData;
-
fi->h = NULL;
fi->isSource =
(headerIsEntry(h, RPMTAG_SOURCERPM) == 0 &&
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmfi.h
============================================================================
$ cvs diff -u -r2.42 -r2.43 rpmfi.h
--- rpm/lib/rpmfi.h 13 Oct 2007 20:00:55 -0000 2.42
+++ rpm/lib/rpmfi.h 14 Oct 2007 19:05:38 -0000 2.43
@@ -110,11 +110,6 @@
/*@dependent@*/ /*@relnull@*/
rpmte te;
- HGE_t hge; /*!< Vector to headerGetEntry() */
- HAE_t hae; /*!< Vector to headerAddEntry() */
- HME_t hme; /*!< Vector to headerModifyEntry() */
- HRE_t hre; /*!< Vector to headerRemoveEntry() */
- HFD_t hfd; /*!< Vector to headerFreeData() */
/*-----------------------------*/
uid_t uid; /*!< File uid (default). */
gid_t gid; /*!< File gid (default). */
@@ .
Received on Sun Oct 14 21:05:38 2007