RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 08-Sep-2007 23:01:26 Branch: HEAD Handle: 2007090822012500 Modified files: rpm CHANGES rpm/lib librpm.vers package.c psm.c rpmchecksig.c rpmts.c rpmts.h signature.c Log: - rip rpmtsCleanDig() inlining the code. Summary: Revision Changes Path 1.1625 +1 -0 rpm/CHANGES 1.13 +0 -1 rpm/lib/librpm.vers 2.153 +13 -6 rpm/lib/package.c 2.225 +1 -2 rpm/lib/psm.c 1.138 +7 -4 rpm/lib/rpmchecksig.c 2.92 +2 -7 rpm/lib/rpmts.c 2.70 +0 -7 rpm/lib/rpmts.h 2.185 +0 -1 rpm/lib/signature.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/CHANGES ============================================================================ $ cvs diff -u -r1.1624 -r1.1625 CHANGES --- rpm/CHANGES 8 Sep 2007 18:55:45 -0000 1.1624 +++ rpm/CHANGES 8 Sep 2007 21:01:25 -0000 1.1625 @@ -1,4 +1,5 @@ 4.5 -> 5.0: + - jbj: rip rpmtsCleanDig() inlining the code. - jbj: refactor headerVerifyInfo(). - jbj: pour the amber over the corpse of the rpmlead. Ptooey! R.I.P. - jbj: stub in rpmpkgFoo() i/o methods. @@ . patch -p0 <<'@@ .' Index: rpm/lib/librpm.vers ============================================================================ $ cvs diff -u -r1.12 -r1.13 librpm.vers --- rpm/lib/librpm.vers 8 Sep 2007 18:55:45 -0000 1.12 +++ rpm/lib/librpm.vers 8 Sep 2007 21:01:25 -0000 1.13 @@ -336,7 +336,6 @@ rpmtsCheckDSIProblems; rpmtsChrootDone; rpmtsClean; - rpmtsCleanDig; rpmtsCloseDB; rpmtsCloseSDB; rpmtsColor; @@ . patch -p0 <<'@@ .' Index: rpm/lib/package.c ============================================================================ $ cvs diff -u -r2.152 -r2.153 package.c --- rpm/lib/package.c 8 Sep 2007 18:55:45 -0000 2.152 +++ rpm/lib/package.c 8 Sep 2007 21:01:25 -0000 2.153 @@ -9,10 +9,12 @@ #include <rpmio_internal.h> #include <rpmlib.h> +#include <rpmte.h> /* XXX rpmtsi */ +#define _RPMTS_INTERNAL /* XXX rpmtsCleanDig() */ #include "rpmts.h" #include "misc.h" /* XXX stripTrailingChar() */ -#include <pkgio.h> /* XXX readLead */ +#include <pkgio.h> #include "header_internal.h" /* XXX headerCheck */ #include "signature.h" @@ -506,7 +508,8 @@ rpmMessage(RPMMESS_ERROR, _("skipping header with unverifiable V%u signature\n"), dig->signature.version); - rpmtsCleanDig(ts); + ts->sig = headerFreeData(ts->sig, ts->sigtype); + ts->dig = pgpFreeDig(ts->dig); rc = RPMRC_FAIL; goto exit; } @@ -549,7 +552,8 @@ rpmMessage(RPMMESS_ERROR, _("skipping header with unverifiable V%u signature\n"), dig->signature.version); - rpmtsCleanDig(ts); + ts->sig = headerFreeData(ts->sig, ts->sigtype); + ts->dig = pgpFreeDig(ts->dig); rc = RPMRC_FAIL; goto exit; } @@ -604,8 +608,10 @@ /[EMAIL PROTECTED]@*/ /* XXX headerCheck can recurse, free info only at top level. */ - if (hclvl == 1) - rpmtsCleanDig(ts); + if (hclvl == 1) { + ts->sig = headerFreeData(ts->sig, ts->sigtype); + ts->dig = pgpFreeDig(ts->dig); + } if (info->tag == RPMTAG_SHA1HEADER) sig = _free(sig); hclvl--; @@ -1065,7 +1071,8 @@ (void) rpmswSub(rpmtsOp(ts, RPMTS_OP_READHDR), opsave); - rpmtsCleanDig(ts); + ts->sig = headerFreeData(ts->sig, ts->sigtype); + ts->dig = pgpFreeDig(ts->dig); sigh = rpmFreeSignature(sigh); return rc; } @@ . patch -p0 <<'@@ .' Index: rpm/lib/psm.c ============================================================================ $ cvs diff -u -r2.224 -r2.225 psm.c --- rpm/lib/psm.c 8 Sep 2007 18:22:55 -0000 2.224 +++ rpm/lib/psm.c 8 Sep 2007 21:01:25 -0000 2.225 @@ -27,8 +27,7 @@ #define _RPMTS_INTERNAL /* XXX ts->notify */ #include "rpmts.h" -#define _RPMLEAD_INTERNAL -#include <pkgio.h> /* writeLead proto, RPMLEAD_BINARY */ +#include <pkgio.h> #include "signature.h" /* signature constants */ #include "misc.h" /* XXX stripTrailingChar() */ #include "rpmdb.h" /* XXX for db_chrootDone */ @@ . patch -p0 <<'@@ .' Index: rpm/lib/rpmchecksig.c ============================================================================ $ cvs diff -u -r1.137 -r1.138 rpmchecksig.c --- rpm/lib/rpmchecksig.c 8 Sep 2007 18:22:55 -0000 1.137 +++ rpm/lib/rpmchecksig.c 8 Sep 2007 21:01:25 -0000 1.138 @@ -10,12 +10,14 @@ #define _RPMEVR_INTERNAL /* XXX RPMSENSE_KEYRING */ #include <rpmevr.h> +#include <rpmte.h> /* XXX rpmtsi */ +#define _RPMTS_INTERNAL /* XXX rpmtsCleanDig */ +#include <rpmts.h> + #include "rpmdb.h" #include "rpmgi.h" -#include "rpmts.h" -#define _RPMLEAD_INTERNAL -#include <pkgio.h> /* XXX readLead/writeLead */ +#include <pkgio.h> #include "signature.h" #include "misc.h" /* XXX for makeTempFile() */ #include "debug.h" @@ -1129,8 +1131,9 @@ } exit: + ts->sig = headerFreeData(ts->sig, ts->sigtype); + ts->dig = pgpFreeDig(ts->dig); sigh = rpmFreeSignature(sigh); - rpmtsCleanDig(ts); return res; } @@ . patch -p0 <<'@@ .' Index: rpm/lib/rpmts.c ============================================================================ $ cvs diff -u -r2.91 -r2.92 rpmts.c --- rpm/lib/rpmts.c 31 Aug 2007 14:49:32 -0000 2.91 +++ rpm/lib/rpmts.c 8 Sep 2007 21:01:25 -0000 2.92 @@ -713,12 +713,6 @@ return ps; } -void rpmtsCleanDig(rpmts ts) -{ - ts->sig = headerFreeData(ts->sig, ts->sigtype); - ts->dig = pgpFreeDig(ts->dig); -} - void rpmtsClean(rpmts ts) { rpmtsi pi; rpmte p; @@ -743,7 +737,8 @@ ts->probs = rpmpsFree(ts->probs); - rpmtsCleanDig(ts); + ts->sig = headerFreeData(ts->sig, ts->sigtype); + ts->dig = pgpFreeDig(ts->dig); } void rpmtsEmpty(rpmts ts) @@ . patch -p0 <<'@@ .' Index: rpm/lib/rpmts.h ============================================================================ $ cvs diff -u -r2.69 -r2.70 rpmts.h --- rpm/lib/rpmts.h 21 Aug 2007 03:41:52 -0000 2.69 +++ rpm/lib/rpmts.h 8 Sep 2007 21:01:25 -0000 2.70 @@ -566,13 +566,6 @@ /[EMAIL PROTECTED] ts @*/; /** \ingroup rpmts - * Free signature verification data. - * @param ts transaction set - */ -void rpmtsCleanDig(rpmts ts) - /[EMAIL PROTECTED] ts @*/; - -/** \ingroup rpmts * Free memory needed only for dependency checks and ordering. * @param ts transaction set */ @@ . patch -p0 <<'@@ .' Index: rpm/lib/signature.c ============================================================================ $ cvs diff -u -r2.184 -r2.185 signature.c --- rpm/lib/signature.c 8 Sep 2007 18:22:55 -0000 2.184 +++ rpm/lib/signature.c 8 Sep 2007 21:01:25 -0000 2.185 @@ -16,7 +16,6 @@ #include "misc.h" /* XXX for dosetenv() and makeTempFile() */ #include "legacy.h" /* XXX for mdbinfile() */ -#define _RPMLEAD_INTERNAL #include <pkgio.h> /* XXX sizeof(struct rpmlead) */ #include "signature.h" #include "header_internal.h" @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org