RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES rpm/build/ files.c pack.c parsePreamble.c pars...

From: Jeff Johnson <jbj@rpm5.org>
Date: Wed 17 Oct 2007 - 22:04:53 CEST
Message-Id: <20071017200453.E4B81348460@rpm5.org>
  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:   17-Oct-2007 22:04:53
  Branch: HEAD                             Handle: 2007101721045003

  Modified files:
    rpm                     CHANGES
    rpm/build               files.c pack.c parsePreamble.c parseSpec.c
                            reqprov.c
    rpm/lib                 depends.c formats.c package.c psm.c rpmchecksig.c
                            rpmds.c rpmfc.c rpmfi.c rpminstall.c rpmrollback.c
                            rpmte.c rpmts.c transaction.c
    rpm/python              header-py.c
    rpm/rpmdb               hdrNVR.c hdrinline.h header.h pkgio.c rpmdb.c
                            signature.c
    rpm/tools               rpmcache.c

  Log:
    - commit to hge(h, he, ...) extraction in API. ABI not yet.

  Summary:
    Revision    Changes     Path
    1.1724      +1  -0      rpm/CHANGES
    1.275       +5  -5      rpm/build/files.c
    2.239       +6  -6      rpm/build/pack.c
    2.137       +3  -3      rpm/build/parsePreamble.c
    2.110       +1  -1      rpm/build/parseSpec.c
    1.75        +4  -4      rpm/build/reqprov.c
    1.353       +7  -7      rpm/lib/depends.c
    2.114       +12 -3      rpm/lib/formats.c
    2.176       +3  -3      rpm/lib/package.c
    2.247       +32 -32     rpm/lib/psm.c
    1.160       +4  -4      rpm/lib/rpmchecksig.c
    2.75        +9  -9      rpm/lib/rpmds.c
    1.27        +2  -2      rpm/lib/rpmfc.c
    2.91        +17 -17     rpm/lib/rpmfi.c
    1.177       +3  -3      rpm/lib/rpminstall.c
    1.22        +5  -5      rpm/lib/rpmrollback.c
    2.62        +10 -10     rpm/lib/rpmte.c
    2.113       +2  -2      rpm/lib/rpmts.c
    1.346       +3  -3      rpm/lib/transaction.c
    1.66        +8  -8      rpm/python/header-py.c
    1.19        +3  -3      rpm/rpmdb/hdrNVR.c
    1.20        +5  -10     rpm/rpmdb/hdrinline.h
    1.41        +6  -15     rpm/rpmdb/header.h
    1.20        +2  -2      rpm/rpmdb/pkgio.c
    1.191       +20 -16     rpm/rpmdb/rpmdb.c
    1.13        +1  -2      rpm/rpmdb/signature.c
    2.20        +1  -1      rpm/tools/rpmcache.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1723 -r1.1724 CHANGES
  --- rpm/CHANGES	17 Oct 2007 18:32:53 -0000	1.1723
  +++ rpm/CHANGES	17 Oct 2007 20:04:50 -0000	1.1724
  @@ -1,4 +1,5 @@
   4.5 -> 5.0:
  +    - jbj: commit to hge(h, he, ...) extraction in API. ABI not yet.
       - jbj: remove the pointless ;-) indirection in *(HE_t) for type/count.
       - jbj: drill rpmTagData everywhere.
       - jbj: start regularizing hae/hme calls.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/files.c
  ============================================================================
  $ cvs diff -u -r1.274 -r1.275 files.c
  --- rpm/build/files.c	17 Oct 2007 18:32:54 -0000	1.274
  +++ rpm/build/files.c	17 Oct 2007 20:04:50 -0000	1.275
  @@ -280,10 +280,10 @@
       int i;
   
       he->tag = RPMTAG_FILEMTIMES;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       mtime = he_p.i32p;
       he->tag = RPMTAG_OLDFILENAMES;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       
       for (i = 0; i < he->c; i++) {
   	xx = currentTime - mtime[i];
  @@ -1195,7 +1195,7 @@
       }
   
       he->tag = RPMTAG_OLDFILENAMES;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       fileNames = he_p.argv;
       count = he->c;
       if (!xx || fileNames == NULL || count <= 0)
  @@ -2227,7 +2227,7 @@
       fl.buildRootURL = rpmGenPath(spec->rootURL, "%{?buildroot}", NULL);
   
       he->tag = RPMTAG_DEFAULTPREFIX;
  -    xx = hge(pkg->header, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(pkg->header, he, 0);
       fl.prefix = he_p.str;
   
       fl.fileCount = 0;
  @@ -2707,7 +2707,7 @@
   	(void) headerMacrosLoad(pkg->header);
   
   	he->tag = RPMTAG_NVRA;
  -	xx = hge(pkg->header, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(pkg->header, he, 0);
   	rpmlog(RPMLOG_NOTICE, _("Processing files: %s\n"), he_p.str);
   	he_p.ptr = _free(he_p.ptr);
   		   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/pack.c
  ============================================================================
  $ cvs diff -u -r2.238 -r2.239 pack.c
  --- rpm/build/pack.c	17 Oct 2007 18:32:54 -0000	2.238
  +++ rpm/build/pack.c	17 Oct 2007 20:04:50 -0000	2.239
  @@ -181,7 +181,7 @@
       int xx;
   
       he->tag = tag;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       if (xx) {
   	appendLineStringBuf(sb, he_p.str);
   	(void) headerRemoveEntry(h, tag);
  @@ -461,7 +461,7 @@
       pEVR = p = alloca(21 + strlen(V) + 1 + strlen(R) + 1);
       *p = '\0';
       he->tag = RPMTAG_EPOCH;
  -    gotE = hge(h, he->tag, &he->t, he->p, &he->c);
  +    gotE = hge(h, he, 0);
       E = (he_p.i32p ? *he_p.i32p : 0);
       he_p.ptr = _free(he_p.ptr);
       if (gotE) {
  @@ -475,7 +475,7 @@
        * If no provides at all are available, we can just add.
        */
       he->tag = RPMTAG_PROVIDENAME;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       provides = he_p.argv;
       providesCount = he->c;
       if (!xx)
  @@ -485,7 +485,7 @@
        * Otherwise, fill in entries on legacy packages.
        */
       he->tag = RPMTAG_PROVIDEVERSION;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       providesEVR = he_p.argv;
       if (!xx) {
   	for (i = 0; i < providesCount; i++) {
  @@ -500,7 +500,7 @@
       }
   
       he->tag = RPMTAG_PROVIDEFLAGS;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       provideFlags = he_p.i32p;
   
       /*@-nullderef@*/	/* LCL: providesEVR is not NULL */
  @@ -911,7 +911,7 @@
   	    binFormat = _free(binFormat);
   	    if (binRpm == NULL) {
   		he->tag = RPMTAG_NVRA;
  -		xx = hge(pkg->header, he->tag, &he->t, he->p, &he->c);
  +		xx = hge(pkg->header, he, 0);
   		rpmlog(RPMLOG_ERR, _("Could not generate output "
   		     "filename for package %s: %s\n"), he_p.str, errorString);
   		he_p.ptr = _free(he_p.ptr);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/parsePreamble.c
  ============================================================================
  $ cvs diff -u -r2.136 -r2.137 parsePreamble.c
  --- rpm/build/parsePreamble.c	17 Oct 2007 18:32:54 -0000	2.136
  +++ rpm/build/parsePreamble.c	17 Oct 2007 20:04:50 -0000	2.137
  @@ -218,7 +218,7 @@
       int xx;
   
       he->tag = tag;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       if (!xx)
   	return -1;
   /*@-boundsread@*/
  @@ -461,7 +461,7 @@
   	t->t_msgid = NULL;
   	if (!(t->t_lang && strcmp(t->t_lang, RPMBUILD_DEFAULT_LANG))) {
   	    he->tag = RPMTAG_NAME;
  -	    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	    xx = hge(h, he, 0);
   	    if (xx) {
   		char buf[1024];
   		sprintf(buf, "%s(%s)", he_p.str, tagName(tag));
  @@ -601,7 +601,7 @@
       case RPMTAG_PREFIXES:
   	addOrAppendListEntry(pkg->header, tag, field);
   	he->tag = tag;
  -	xx = hge(pkg->header, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(pkg->header, he, 0);
   	if (tag == RPMTAG_PREFIXES)
   	while (he->c--) {
   	    if (he_p.argv[he->c][0] != '/') {
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/parseSpec.c
  ============================================================================
  $ cvs diff -u -r2.109 -r2.110 parseSpec.c
  --- rpm/build/parseSpec.c	17 Oct 2007 18:32:54 -0000	2.109
  +++ rpm/build/parseSpec.c	17 Oct 2007 20:04:50 -0000	2.110
  @@ -606,7 +606,7 @@
       for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
   	if (!headerIsEntry(pkg->header, RPMTAG_DESCRIPTION)) {
   	    he->tag = RPMTAG_NVRA;
  -	    xx = hge(pkg->header, he->tag, &he->t, he->p, &he->c);
  +	    xx = hge(pkg->header, he, 0);
   	    rpmlog(RPMLOG_ERR, _("Package has no %%description: %s\n"),
   			he_p.str);
   	    he_p.ptr = _free(he_p.ptr);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/reqprov.c
  ============================================================================
  $ cvs diff -u -r1.74 -r1.75 reqprov.c
  --- rpm/build/reqprov.c	17 Oct 2007 18:32:54 -0000	1.74
  +++ rpm/build/reqprov.c	17 Oct 2007 20:04:50 -0000	1.75
  @@ -62,7 +62,7 @@
       
       /* Check for duplicate dependencies. */
       he->tag = nametag;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       names = he_p.argv;
       len = he->c;
       if (xx) {
  @@ -73,15 +73,15 @@
   
   	if (flagtag) {
   	    he->tag = versiontag;
  -	    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	    xx = hge(h, he, 0);
   	    versions = he_p.argv;
   	    he->tag = flagtag;
  -	    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	    xx = hge(h, he, 0);
   	    flags = he_p.i32p;
   	}
   	if (indextag) {
   	    he->tag = indextag;
  -	    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	    xx = hge(h, he, 0);
   	    indexes = he_p.i32p;
   	}
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/depends.c
  ============================================================================
  $ cvs diff -u -r1.352 -r1.353 depends.c
  --- rpm/lib/depends.c	17 Oct 2007 18:32:55 -0000	1.352
  +++ rpm/lib/depends.c	17 Oct 2007 20:04:51 -0000	1.353
  @@ -159,10 +159,10 @@
       int xx;
   
       he->tag = RPMTAG_HDRID;
  -    xx = hge(first, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(first, he, 0);
       one = he_p.str;
       he->tag = RPMTAG_HDRID;
  -    xx = hge(second, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(second, he, 0);
       two = he_p.str;
   
       if (one && two)
  @@ -234,16 +234,16 @@
        * Check platform affinity of binary packages.
        */
       he->tag = RPMTAG_ARCH;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       arch = he_p.str;
       he->tag = RPMTAG_OS;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       os = he_p.str;
       if (nplatpat > 1) {
   	const char * platform = NULL;
   
   	he->tag = RPMTAG_PLATFORM;
  -	xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(h, he, 0);
   	platform = he_p.str;
   	if (!xx || platform == NULL)
   	    platform = rpmExpand(arch, "-unknown-", os, NULL);
  @@ -252,7 +252,7 @@
   	if (rc <= 0) {
   	    rpmps ps = rpmtsProblems(ts);
   	    he->tag = RPMTAG_NVRA;
  -	    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	    xx = hge(h, he, 0);
   assert(he_p.str != NULL);
   	    rpmpsAppend(ps, RPMPROB_BADPLATFORM, he_p.str, key,
                           platform, NULL, NULL, 0);
  @@ -1331,7 +1331,7 @@
   	int rc;
   
   	he->tag = RPMTAG_NVRA;
  -	rc = hge(h, he->tag, &he->t, he->p, &he->c);
  +	rc = hge(h, he, 0);
   assert(he_p.str != NULL);
   	if (!(depFlags & RPMDEPS_FLAG_NOREQUIRES))
   	    requires = rpmdsNew(h, RPMTAG_REQUIRENAME, scareMem);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/formats.c
  ============================================================================
  $ cvs diff -u -r2.113 -r2.114 formats.c
  --- rpm/lib/formats.c	17 Oct 2007 18:32:55 -0000	2.113
  +++ rpm/lib/formats.c	17 Oct 2007 20:04:51 -0000	2.114
  @@ -57,13 +57,22 @@
       HGE_t hge = (HGE_t)headerGetExtension;
       rpmTagData fnames = { .ptr = NULL };
       rpmTagData fsizes = { .ptr = NULL };
  +    rpmTagData * p;
       uint_64 * usages;
       int numFiles;
       int rc = 1;		/* assume error */
  +    int xx, yy;
   
  -    if (!hge(h, RPMTAG_FILESIZES, NULL, &fsizes, NULL)
  -     ||	!hge(h, RPMTAG_FILEPATHS, NULL, &fnames, &numFiles))
  -    {
  +    p = he->p;
  +    he->tag = RPMTAG_FILESIZES;
  +    he->p = &fsizes;
  +    xx = hge(h, he, 0);
  +    he->tag = RPMTAG_FILEPATHS;
  +    he->p = &fnames;
  +    yy = hge(h, he, 0);
  +    numFiles = he->c;
  +    he->p = p;
  +    if (!xx || !yy) {
   	numFiles = 0;
   	fsizes.ui32p = _free(fsizes.ui32p);
   	fnames.argv = _free(fnames.argv);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/package.c
  ============================================================================
  $ cvs diff -u -r2.175 -r2.176 package.c
  --- rpm/lib/package.c	17 Oct 2007 18:32:55 -0000	2.175
  +++ rpm/lib/package.c	17 Oct 2007 20:04:51 -0000	2.176
  @@ -351,7 +351,7 @@
       /* Retrieve the tag parameters from the signature header. */
       sig = NULL;
       he->tag = sigtag;
  -    xx = hge(sigh, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(sigh, he, 0);
       sigtype = he->t;
       sig = he_p.ptr;
       siglen = he->c;
  @@ -381,7 +381,7 @@
   	size_t nmagic = 0;
   
   	he->tag = RPMTAG_HEADERIMMUTABLE;
  -	xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(h, he, 0);
   	uht = he->t;
   	uh = he_p.ptr;
   	uhc = he->c;
  @@ -420,7 +420,7 @@
   	size_t nmagic = 0;
   
   	he->tag = RPMTAG_HEADERIMMUTABLE;
  -	xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(h, he, 0);
   	uht = he->t;
   	uh = he_p.ptr;
   	uhc = he->c;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/psm.c
  ============================================================================
  $ cvs diff -u -r2.246 -r2.247 psm.c
  --- rpm/lib/psm.c	17 Oct 2007 18:32:55 -0000	2.246
  +++ rpm/lib/psm.c	17 Oct 2007 20:04:51 -0000	2.247
  @@ -65,11 +65,11 @@
       int xx;
   
       he->tag = RPMTAG_EPOCH;
  -    xx = hge(first, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(first, he, 0);
       Eone = (xx && he_p.i32p ? *he_p.i32p : 0);
       he_p.ptr = _free(he_p.ptr);
       he->tag = RPMTAG_EPOCH;
  -    xx = hge(second, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(second, he, 0);
       Etwo = (xx && he_p.i32p ? *he_p.i32p : 0);
       he_p.ptr = _free(he_p.ptr);
   
  @@ -79,10 +79,10 @@
   	return 1;
   
       he->tag = RPMTAG_VERSION;
  -    xx = hge(first, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(first, he, 0);
       one = he_p.str;
       he->tag = RPMTAG_VERSION;
  -    xx = hge(second, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(second, he, 0);
       two = he_p.str;
       rc = rpmvercmp(one, two);
       one = _free(one);
  @@ -91,10 +91,10 @@
   	return rc;
   
       he->tag = RPMTAG_RELEASE;
  -    xx = hge(first, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(first, he, 0);
       one = he_p.str;
       he->tag = RPMTAG_RELEASE;
  -    xx = hge(second, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(second, he, 0);
       two = he_p.str;
       rc = rpmvercmp(one, two);
       one = _free(one);
  @@ -265,7 +265,7 @@
       if (cookie) {
   	*cookie = NULL;
   	he->tag = RPMTAG_COOKIE;
  -	xx = hge(fi->h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(fi->h, he, 0);
   	*cookie = he_p.str;
       }
   
  @@ -285,7 +285,7 @@
   
       if (fi->h != NULL) {	/* XXX can't happen */
   	he->tag = RPMTAG_FILEPATHS;
  -	xx = hge(fi->h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(fi->h, he, 0);
   	fi->apath = he_p.argv;
   
   	if (headerIsEntry(fi->h, RPMTAG_COOKIE))
  @@ -513,7 +513,7 @@
   	*ssp |= (RPMSCRIPT_STATE_LUA|RPMSCRIPT_STATE_EXEC);
   
       he->tag = RPMTAG_NVRA;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
   assert(xx && he_p.str != NULL);
   
       /* Save the current working directory. */
  @@ -659,7 +659,7 @@
   	return RPMRC_OK;
   
       he->tag = RPMTAG_NVRA;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
   assert(he_p.str != NULL);
       NVRA = he_p.str;
   
  @@ -709,13 +709,13 @@
       }
   
       he->tag = RPMTAG_INSTPREFIXES;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       prefixes = he_p.argv;
       numPrefixes = he->c;
       if (!xx) {
   	he_p.ptr = _free(he_p.ptr);
   	he->tag = RPMTAG_INSTALLPREFIX;
  -	xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(h, he, 0);
   	if (xx) {
   	    char * t;
   	    prefixes = xmalloc(sizeof(*prefixes) + strlen(he_p.argv[0]) + 1);
  @@ -970,12 +970,12 @@
   
   assert(fi->h != NULL);
       he->tag = psm->scriptTag;
  -    xx = hge(fi->h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(fi->h, he, 0);
       script = he_p.str;
       if (script == NULL)
   	goto exit;
       he->tag = psm->progTag;
  -    xx = hge(fi->h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(fi->h, he, 0);
       if (he_p.ptr == NULL)
   	goto exit;
   
  @@ -1038,10 +1038,10 @@
       int i;
   
       he->tag = RPMTAG_NAME;
  -    xx = hge(sourceH, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(sourceH, he, 0);
       sourceName = he_p.str;
       he->tag = RPMTAG_NAME;
  -    xx = hge(triggeredH, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(triggeredH, he, 0);
       triggerName = he_p.str;
   
       trigger = rpmdsInit(rpmdsNew(triggeredH, RPMTAG_TRIGGERNAME, scareMem));
  @@ -1069,13 +1069,13 @@
   	    continue;
   
   	he->tag = RPMTAG_TRIGGERINDEX;
  -	xx = hge(triggeredH, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(triggeredH, he, 0);
   	triggerIndices = he_p.i32p;
   	he->tag = RPMTAG_TRIGGERSCRIPTS;
  -	xx = hge(triggeredH, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(triggeredH, he, 0);
   	triggerScripts = he_p.argv;
   	he->tag = RPMTAG_TRIGGERSCRIPTPROG;
  -	xx = hge(triggeredH, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(triggeredH, he, 0);
   	triggerProgs = he_p.argv;
   
   	if (triggerIndices && triggerScripts && triggerProgs) {
  @@ -1193,11 +1193,11 @@
       if (fi->h == NULL)	return rc;	/* XXX can't happen */
   
       he->tag = RPMTAG_TRIGGERNAME;
  -    xx = hge(fi->h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(fi->h, he, 0);
       triggerNames = he_p.argv;
       numTriggers = he->c;
       he->tag = RPMTAG_TRIGGERINDEX;
  -    xx = hge(fi->h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(fi->h, he, 0);
       triggerIndices = he_p.i32p;
       numTriggerIndices = he->c;
   
  @@ -1368,7 +1368,7 @@
       int xx;
   
       he->tag = tag;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       val = (xx && he_p.ui32p ? *he_p.ui32p : 0);
       he_p.ptr = _free(he_p.ptr);
       return val;
  @@ -1391,7 +1391,7 @@
       int xx = 1;
   
       he->tag = tag;
  -    if (hge(sh, he->tag, &he->t, he->p, &he->c) && he->c > 0)
  +    if (hge(sh, he, 0) && he->c > 0)
   	xx = headerAddEntry(th, he->tag, he->t, he_p.ptr, he->c);
   assert(xx);
       he_p.ptr = _free(he_p.ptr);
  @@ -1675,7 +1675,7 @@
   	     * need the leading / stripped.
   	     */
   	    he->tag = RPMTAG_DEFAULTPREFIX;
  -	    xx = hge(fi->h, he->tag, &he->t, he->p, &he->c);
  +	    xx = hge(fi->h, he, 0);
   	    fi->striplen = (xx && he_p.str ? strlen(he_p.str) + 1 : 1);
   	    he_p.ptr = _free(he_p.ptr);
   	    fi->mapflags =
  @@ -1685,18 +1685,18 @@
   		he->tag = RPMTAG_ORIGPATHS;
   	    else
   		he->tag = RPMTAG_FILEPATHS;
  -	    xx = hge(fi->h, he->tag, &he->t, he->p, &he->c);
  +	    xx = hge(fi->h, he, 0);
   assert(he_p.argv != NULL);
   	    fi->apath = he_p.argv;
   	
   	    if (fi->fuser == NULL) {
   		he->tag = RPMTAG_FILEUSERNAME;
  -		xx = hge(fi->h, he->tag, &he->t, he->p, &he->c);
  +		xx = hge(fi->h, he, 0);
   		fi->fuser = he_p.argv;
   	    }
   	    if (fi->fgroup == NULL) {
   		he->tag = RPMTAG_FILEGROUPNAME;
  -		xx = hge(fi->h, he->tag, &he->t, he->p, &he->c);
  +		xx = hge(fi->h, he, 0);
   		fi->fgroup = he_p.argv;
   	    }
   	    rc = RPMRC_OK;
  @@ -1818,19 +1818,19 @@
   
   		/* Save originnal header's origin (i.e. URL) */
   		he->tag = RPMTAG_PACKAGEORIGIN;
  -		xx = hge(fi->h, he->tag, &he->t, he->p, &he->c);
  +		xx = hge(fi->h, he, 0);
   		origin = he_p.str;
   
   		/* Retrieve original header blob. */
   		he->tag = RPMTAG_HEADERIMMUTABLE;
  -		xx = hge(fi->h, he->tag, &he->t, he->p, &he->c);
  +		xx = hge(fi->h, he, 0);
   		uh = he_p.ptr;
   		if (xx && uh != NULL) {
   		    psm->oh = headerCopyLoad(uh);
   		    uh = _free(uh);
   		} else {
   		    he->tag = RPMTAG_HEADERIMAGE;
  -		    xx = hge(fi->h, he->tag, &he->t, he->p, &he->c);
  +		    xx = hge(fi->h, he, 0);
   		    uh = he_p.ptr;
   		    if (xx && uh != NULL) {
   			HeaderIterator hi;
  @@ -2317,7 +2317,7 @@
   	char * t;
   
   	he->tag = RPMTAG_PAYLOADCOMPRESSOR;
  -	xx = hge(fi->h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(fi->h, he, 0);
   	payload_compressor = he_p.str;
   	if (payload_compressor == NULL)
   	    payload_compressor = xstrdup("gzip");
  @@ -2334,7 +2334,7 @@
   	payload_compressor = _free(payload_compressor);
   
   	he->tag = RPMTAG_PAYLOADFORMAT;
  -	xx = hge(fi->h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(fi->h, he, 0);
   	payload_format = he_p.str;
   	if (!xx || payload_format == NULL
   	 || !(!strcmp(payload_format, "tar") || !strcmp(payload_format, "ustar"))) {
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmchecksig.c
  ============================================================================
  $ cvs diff -u -r1.159 -r1.160 rpmchecksig.c
  --- rpm/lib/rpmchecksig.c	17 Oct 2007 18:32:55 -0000	1.159
  +++ rpm/lib/rpmchecksig.c	17 Oct 2007 20:04:51 -0000	1.160
  @@ -150,7 +150,7 @@
       int xx;
   
       he->tag = sigtag;
  -    xx = hge(sigh, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(sigh, he, 0);
       if (xx && he_p.ptr != NULL) {
   	pgpDig dig = pgpNewDig(0);
   
  @@ -267,7 +267,7 @@
   
   	/* Dump the immutable region (if present). */
   	he->tag = RPMTAG_HEADERSIGNATURES;
  -	xx = hge(sigh, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(sigh, he, 0);
   	if (xx) {
   	    HeaderIterator hi;
   	    int_32 htag;
  @@ -698,7 +698,7 @@
   	    size_t nmagic = 0;
   	
   	    he->tag = RPMTAG_HEADERIMMUTABLE;
  -	    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	    xx = hge(h, he, 0);
   	    if (!xx || he_p.ptr == NULL) {
   		h = headerFree(h);
   		rpmlog(RPMLOG_ERR, _("%s: headerGetEntry failed\n"), fn);
  @@ -860,7 +860,7 @@
   #endif
   	) {
   	    he->tag = sigtag;
  -	    xx = hge(sigh, he->tag, &he->t, he->p, &he->c);
  +	    xx = hge(sigh, he, 0);
   	    xx = pgpPrtPkts(he_p.ptr, he->c, dig, 0);
   	    he_p.ptr = _free(he_p.ptr);
   #if defined(SUPPORT_RPMV3_VERIFY_RSA)
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmds.c
  ============================================================================
  $ cvs diff -u -r2.74 -r2.75 rpmds.c
  --- rpm/lib/rpmds.c	17 Oct 2007 18:32:55 -0000	2.74
  +++ rpm/lib/rpmds.c	17 Oct 2007 20:04:51 -0000	2.75
  @@ -286,7 +286,7 @@
   	goto exit;
   
       he->tag = tagN;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       N = he_p.argv;
       Count = he->c;
       if (xx && N != NULL && Count > 0) {
  @@ -302,22 +302,22 @@
   
   	if (tagEVR > 0) {
   	    he->tag = tagEVR;
  -	    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	    xx = hge(h, he, 0);
   	    ds->EVR = he_p.argv;
   	}
   	if (tagF > 0) {
   	    he->tag = tagF;
  -	    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	    xx = hge(h, he, 0);
   	    ds->Flags = he_p.i32p;
   	}
   	{
   	    he->tag = RPMTAG_ARCH;
  -	    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	    xx = hge(h, he, 0);
   	    ds->A = he_p.str;
   	}
   	{
   	    he->tag = RPMTAG_BUILDTIME;
  -	    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	    xx = hge(h, he, 0);
   	    ds->BT = (he_p.ui32p ? *he_p.ui32p : 0);
   	    he_p.ptr = _free(he_p.ptr);
   	}
  @@ -510,7 +510,7 @@
   	goto exit;
   
       he->tag = RPMTAG_EPOCH;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       E = (he_p.i32p ? *he_p.i32p : 0);
       he_p.ptr = _free(he_p.ptr);
   
  @@ -543,11 +543,11 @@
       ds->Flags = xmalloc(sizeof(*ds->Flags));	ds->Flags[0] = Flags;
   
       he->tag = RPMTAG_ARCH;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       ds->A = he_p.str;
   
       he->tag = RPMTAG_BUILDTIME;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       ds->BT = (he_p.ui32p ? *he_p.ui32p : 0);
       he_p.ptr = _free(he_p.ptr);
   
  @@ -3740,7 +3740,7 @@
       (void) headerNEVRA(h, &pkgN, NULL, &V, &R, NULL);
   /*@=mods@*/
       he->tag = RPMTAG_EPOCH;
  -    gotE = hge(h, he->tag, &he->t, he->p, &he->c);
  +    gotE = hge(h, he, 0);
       E = (he_p.i32p ? *he_p.i32p : 0);
       he_p.ptr = _free(he_p.ptr);
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmfc.c
  ============================================================================
  $ cvs diff -u -r1.26 -r1.27 rpmfc.c
  --- rpm/lib/rpmfc.c	17 Oct 2007 18:32:55 -0000	1.26
  +++ rpm/lib/rpmfc.c	17 Oct 2007 20:04:51 -0000	1.27
  @@ -1341,7 +1341,7 @@
   
   	/* Retrieve scriptlet interpreter. */
   	he->tag = dm->ntag;
  -	xx = hge(pkg->header, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(pkg->header, he, 0);
   	if (!xx || he_p.str == NULL)
   	    continue;
   	xx = strcmp(he_p.str, "/bin/sh") && strcmp(he_p.str, "/bin/bash");
  @@ -1351,7 +1351,7 @@
   
   	/* Retrieve scriptlet body. */
   	he->tag = dm->vtag;
  -	xx = hge(pkg->header, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(pkg->header, he, 0);
   	if (!xx || he_p.str == NULL)
   	    continue;
   	truncStringBuf(sb_stdin);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmfi.c
  ============================================================================
  $ cvs diff -u -r2.90 -r2.91 rpmfi.c
  --- rpm/lib/rpmfi.c	17 Oct 2007 18:32:55 -0000	2.90
  +++ rpm/lib/rpmfi.c	17 Oct 2007 20:04:51 -0000	2.91
  @@ -720,7 +720,7 @@
       int xx;
   
       he->tag = RPMTAG_PREFIXES;
  -    xx = hge(origH, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(origH, he, 0);
       validType = he->t;
       validRelocations = he_p.argv;
       numValid = he->c;
  @@ -883,24 +883,24 @@
       }
   
       he->tag = RPMTAG_BASENAMES;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       baseNames = he_p.argv;
       fileCount = he->c;
       he->tag = RPMTAG_DIRINDEXES;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       dirIndexes = he_p.i32p;
       he->tag = RPMTAG_DIRNAMES;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       dirNames = he_p.argv;
       dirCount = he->c;
       he->tag = RPMTAG_FILEFLAGS;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       fFlags = he_p.ui32p;
       he->tag = RPMTAG_FILECOLORS;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       fColors = he_p.ui32p;
       he->tag = RPMTAG_FILEMODES;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       fModes = he_p.ui16p;
   
       dColors = alloca(dirCount * sizeof(*dColors));
  @@ -1102,19 +1102,19 @@
       /* Save original filenames in header and replace (relocated) filenames. */
       if (nrelocated) {
   	he->tag = RPMTAG_BASENAMES;
  -	xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(h, he, 0);
   	he->tag = RPMTAG_ORIGBASENAMES;
   	xx = hae(h, he->tag, he->t, he_p, he->c);
   	he_p.ptr = _free(he_p.ptr);
   
   	he->tag = RPMTAG_DIRNAMES;
  -	xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(h, he, 0);
   	he->tag = RPMTAG_ORIGDIRNAMES;
   	xx = hae(h, he->tag, he->t, he_p, he->c);
   	he_p.ptr = _free(he_p.ptr);
   
   	he->tag = RPMTAG_DIRINDEXES;
  -	xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(h, he, 0);
   	he->tag = RPMTAG_ORIGDIRINDEXES;
   	xx = hae(h, he->tag, he->t, he_p, he->c);
   	he_p.ptr = _free(he_p.ptr);
  @@ -1125,7 +1125,7 @@
   	he->c = fileCount;
   	xx = hme(h, he->tag, he->t, he_p, he->c);
   	fi->bnl = _free(fi->bnl);
  -	xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(h, he, 0);
   	fi->bnl = he_p.argv;
   	fi->fc = he->c;
   
  @@ -1135,7 +1135,7 @@
   	he->c = dirCount;
   	xx = hme(h, he->tag, he->t, he_p, he->c);
   	fi->dnl = _free(fi->dnl);
  -	xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(h, he, 0);
   	fi->dnl = he_p.argv;
   	fi->dc = he->c;
   
  @@ -1145,7 +1145,7 @@
   	he->c = fileCount;
   	xx = hme(h, he->tag, he->t, he_p, he->c);
   	fi->dil = _free(fi->dil);
  -	xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(h, he, 0);
   	fi->dil = he_p.ui32p;
       }
   
  @@ -1264,12 +1264,12 @@
   
   #define _fdupestring(_h, _tag, _data) \
       he->tag = _tag; \
  -    xx = hge((_h), he->tag, &he->t, he->p, &he->c); \
  +    xx = hge((_h), he, 0); \
       _data = he_p.str;
   
   #define _fdupedata(_h, _tag, _data) \
       he->tag = _tag; \
  -    xx = hge((_h), he->tag, &he->t, he->p, &he->c); \
  +    xx = hge((_h), he, 0); \
       _data = he_p.ptr;
   
   rpmfi rpmfiNew(const rpmts ts, Header h, rpmTag tagN, int flags)
  @@ -1317,7 +1317,7 @@
   
       /* 0 means unknown */
       he->tag = RPMTAG_ARCHIVESIZE;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       fi->archivePos = 0;
       fi->archiveSize = (xx && he_p.ui32p ? *he_p.ui32p : 0);
       he_p.ptr = _free(he_p.ptr);
  @@ -1331,7 +1331,7 @@
       _fdupestring(h, RPMTAG_VERIFYSCRIPTPROG, fi->verifyscriptprog);
   
       he->tag = RPMTAG_BASENAMES;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       fi->bnl = he_p.argv;
       fi->fc = he->c;
       if (!xx) {
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpminstall.c
  ============================================================================
  $ cvs diff -u -r1.176 -r1.177 rpminstall.c
  --- rpm/lib/rpminstall.c	17 Oct 2007 18:32:55 -0000	1.176
  +++ rpm/lib/rpminstall.c	17 Oct 2007 20:04:51 -0000	1.177
  @@ -421,14 +421,14 @@
   	/* === Check for relocatable package. */
   	if (relocations) {
   	    he->tag = RPMTAG_PREFIXES;
  -	    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	    xx = hge(h, he, 0);
   	    if (xx && he->c == 1) {
   		relocations->oldPath = xstrdup(he_p.argv[0]);
   		he_p.ptr = _free(he_p.ptr);
   	    } else {
   		he_p.ptr = _free(he_p.ptr);
   		he->tag = RPMTAG_NVRA;
  -		xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +		xx = hge(h, he, 0);
   		rpmlog(RPMLOG_ERR,
   			       _("package %s is not relocatable\n"), he_p.str);
   		he_p.ptr = _free(he_p.ptr);
  @@ -445,7 +445,7 @@
   	    int count;
   
   	    he->tag = RPMTAG_NAME;
  -	    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	    xx = hge(h, he, 0);
   assert(xx != 0 && he_p.str != NULL);
   	    mi = rpmtsInitIterator(ts, RPMTAG_NAME, he_p.str, 0);
   	    he_p.ptr = _free(he_p.ptr);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmrollback.c
  ============================================================================
  $ cvs diff -u -r1.21 -r1.22 rpmrollback.c
  --- rpm/lib/rpmrollback.c	17 Oct 2007 18:32:55 -0000	1.21
  +++ rpm/lib/rpmrollback.c	17 Oct 2007 20:04:51 -0000	1.22
  @@ -106,7 +106,7 @@
   #endif
       while ((h = rpmdbNextIterator(mi)) != NULL) {
   	he->tag = tag;
  -	xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(h, he, 0);
   	if (!xx || he_p.i32p == NULL)
   	    continue;
   	tid = (he_p.i32p ? *he_p.i32p : 0);
  @@ -196,7 +196,7 @@
   assert(!strcmp(av[i], origin));
   }
   	he->tag = tag;
  -	xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(h, he, 0);
   	if (!xx || he_p.i32p == NULL)
   	    goto bottom;
   	tid = (he_p.i32p ? *he_p.i32p : 0);
  @@ -313,7 +313,7 @@
   	    int bingo;
   
   	    he->tag = RPMTAG_BLINKPKGID;
  -	    xx = hge(ip->h, he->tag, &he->t, he->p, &he->c);
  +	    xx = hge(ip->h, he, 0);
   	    flinkPkgid = he_p.argv;
   	    pn = he->c;
   
  @@ -324,11 +324,11 @@
   	    }
   
   	    he->tag = RPMTAG_BLINKHDRID;
  -	    xx = hge(ip->h, he->tag, &he->t, he->p, &he->c);
  +	    xx = hge(ip->h, he, 0);
   	    flinkHdrid = he_p.argv;
   	    hn = he->c;
   	    he->tag = RPMTAG_BLINKNEVRA;
  -	    xx = hge(ip->h, he->tag, &he->t, he->p, &he->c);
  +	    xx = hge(ip->h, he, 0);
   	    flinkNEVRA = he_p.argv;
   	    nn = he->c;
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmte.c
  ============================================================================
  $ cvs diff -u -r2.61 -r2.62 rpmte.c
  --- rpm/lib/rpmte.c	17 Oct 2007 18:32:55 -0000	2.61
  +++ rpm/lib/rpmte.c	17 Oct 2007 20:04:51 -0000	2.62
  @@ -102,7 +102,7 @@
       int xx;
   
       he->tag = RPMTAG_NVRA;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
   assert(he_p.str != NULL);
       p->NEVR = he_p.str;
       p->name = xstrdup(p->NEVR);
  @@ -114,11 +114,11 @@
       p->db_instance = 0;
   
       he->tag = RPMTAG_HDRID;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       p->hdrid = he_p.str;
   
       he->tag = RPMTAG_PKGID;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       if (he_p.ui8p != NULL) {
   	static const char hex[] = "0123456789abcdef";
   	char * t;
  @@ -135,11 +135,11 @@
   	p->pkgid = NULL;
   
       he->tag = RPMTAG_ARCH;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       p->arch = he_p.str;
   
       he->tag = RPMTAG_OS;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       p->os = he_p.str;
   
       p->isSource =
  @@ -149,7 +149,7 @@
       p->NEVRA = xstrdup(p->NEVR);
   
       he->tag = RPMTAG_EPOCH;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       if (he_p.i32p != NULL) {
   	p->epoch = xmalloc(20);
   	sprintf(p->epoch, "%d", *he_p.i32p);
  @@ -232,7 +232,7 @@
   	/* XXX 256 is only an estimate of signature header. */
   	p->pkgFileSize = 96 + 256;
   	he->tag = RPMTAG_SIGSIZE;
  -	xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(h, he, 0);
   	if (xx && he_p.ui32p)
   	    p->pkgFileSize += *he_p.ui32p;
   	he_p.ptr = _free(he_p.ptr);
  @@ -614,7 +614,7 @@
       if (msg == NULL)
   	msg = "";
       he->tag = RPMTAG_NVRA;
  -    xx = hge(oh, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(oh, he, 0);
   assert(he_p.str != NULL);
       blinkNEVRA = he_p.str;
   
  @@ -624,7 +624,7 @@
        * tags appended.
        */
       he->tag = RPMTAG_PKGID;
  -    xx = hge(oh, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(oh, he, 0);
       if (xx && he_p.ui8p != NULL) {
   	static const char hex[] = "0123456789abcdef";
   	char * t;
  @@ -641,7 +641,7 @@
   	blinkPkgid = NULL;
   
       he->tag = RPMTAG_HDRID;
  -    xx = hge(oh, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(oh, he, 0);
       blinkHdrid = he_p.str;
   
   /*@-modfilesys@*/
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmts.c
  ============================================================================
  $ cvs diff -u -r2.112 -r2.113 rpmts.c
  --- rpm/lib/rpmts.c	17 Oct 2007 18:32:55 -0000	2.112
  +++ rpm/lib/rpmts.c	17 Oct 2007 20:04:51 -0000	2.113
  @@ -357,7 +357,7 @@
   	    continue;
   
   	he->tag = RPMTAG_NAME;
  -	xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(h, he, 0);
   	hnamelen = ((xx && he_p.str) ? strlen(he_p.str) : 0);
   	he_p.ptr = _free(he_p.ptr);
   
  @@ -367,7 +367,7 @@
   
   	/* XXX Prefer the newest build if given alternatives. */
   	he->tag = RPMTAG_BUILDTIME;
  -	xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(h, he, 0);
   	htime = (xx && he_p.i32p ? *he_p.i32p : 0);
   	he_p.ptr = _free(he_p.ptr);
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/transaction.c
  ============================================================================
  $ cvs diff -u -r1.345 -r1.346 transaction.c
  --- rpm/lib/transaction.c	17 Oct 2007 18:32:55 -0000	1.345
  +++ rpm/lib/transaction.c	17 Oct 2007 20:04:51 -0000	1.346
  @@ -123,7 +123,7 @@
   			&shared->otherPkg, sizeof(shared->otherPkg));
   	while ((h = rpmdbNextIterator(mi)) != NULL) {
   	    he->tag = RPMTAG_NVRA;
  -	    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	    xx = hge(h, he, 0);
   assert(he_p.str != NULL);
   	    altNVRA = he_p.str;
   	    otherFi = rpmfiNew(ts, h, RPMTAG_BASENAMES, scareMem);
  @@ -267,7 +267,7 @@
       }
   
       he->tag = RPMTAG_FILESTATES;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       otherStates = he_p.ptr;
   
       /* XXX there's an obscure segfault here w/o NULL check ... */
  @@ -644,7 +644,7 @@
       if (rc == 0) {
   	rpmps ps = rpmtsProblems(ts);
   	he->tag = RPMTAG_NVRA;
  -	rc = hge(h, he->tag, &he->t, he->p, &he->c);
  +	rc = hge(h, he, 0);
   assert(he_p.str != NULL);
   	rpmpsAppend(ps, RPMPROB_OLDPACKAGE,
   		rpmteNEVR(p), rpmteKey(p),
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/python/header-py.c
  ============================================================================
  $ cvs diff -u -r1.65 -r1.66 header-py.c
  --- rpm/python/header-py.c	17 Oct 2007 18:32:57 -0000	1.65
  +++ rpm/python/header-py.c	17 Oct 2007 20:04:52 -0000	1.66
  @@ -183,7 +183,7 @@
       /*@-branchstate@*/
       if (!headerIsEntry(h, RPMTAG_OLDFILENAMES)) {
   	he->tag = RPMTAG_FILEPATHS;
  -	xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(h, he, 0);
   	if (he_p.ptr == NULL || he->c <= 0)
   	    return;
   	xx = hae(h, RPMTAG_OLDFILENAMES, he->t, he_p.ptr, he->c);
  @@ -231,7 +231,7 @@
       }
   
       he->tag = RPMTAG_OLDFILENAMES;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       fileNames = he_p.argv;
       count = he->c;
       if (!xx || fileNames == NULL || count <= 0)
  @@ -316,7 +316,7 @@
   	compressFilelist(h);
   
       he->tag = RPMTAG_FILEPATHS;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
   
       if (he_p.ptr == NULL || he->c <= 0)
   	return;
  @@ -360,7 +360,7 @@
       pEVR = p = alloca(21 + strlen(V) + 1 + strlen(R) + 1);
       *p = '\0';
       he->tag = RPMTAG_EPOCH;
  -    gotE = hge(h, he->tag, &he->t, he->p, &he->c);
  +    gotE = hge(h, he, 0);
       E = (he_p.i32p ? *he_p.i32p : 0);
       he_p.ptr = _free(he_p.ptr);
       if (gotE) {
  @@ -374,7 +374,7 @@
        * If no provides at all are available, we can just add.
        */
       he->tag = RPMTAG_PROVIDENAME;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       provides = he_p.argv;
       providesCount = he->c;
       if (!xx)
  @@ -384,7 +384,7 @@
        * Otherwise, fill in entries on legacy packages.
        */
       he->tag = RPMTAG_PROVIDEVERSION;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       providesEVR = he_p.argv;
       if (!xx) {
   	for (i = 0; i < providesCount; i++) {
  @@ -399,7 +399,7 @@
       }
   
       he->tag = RPMTAG_PROVIDEFLAGS;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       provideFlags = he_p.i32p;
   
       /*@-nullderef@*/	/* LCL: providesEVR is not NULL */
  @@ -713,7 +713,7 @@
       case RPMTAG_OLDFILENAMES:
       {	
   	he->tag = RPMTAG_FILEPATHS;
  -	xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(h, he, 0);
   	if (p)
   	    *p = he_p.ptr;
   	else
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/hdrNVR.c
  ============================================================================
  $ cvs diff -u -r1.18 -r1.19 hdrNVR.c
  --- rpm/rpmdb/hdrNVR.c	17 Oct 2007 18:32:57 -0000	1.18
  +++ rpm/rpmdb/hdrNVR.c	17 Oct 2007 20:04:53 -0000	1.19
  @@ -57,7 +57,7 @@
   
       for (tagm = tagMacros; tagm->macroname != NULL; tagm++) {
   	he->tag = tagm->tag;
  -	xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(h, he, 0);
   	if (!xx)
   	    continue;
   	switch (he->t) {
  @@ -98,7 +98,7 @@
   
       for (tagm = tagMacros; tagm->macroname != NULL; tagm++) {
   	he->tag = tagm->tag;
  -	xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(h, he, 0);
   	if (!xx)
   	    continue;
   	switch (he->t) {
  @@ -185,7 +185,7 @@
       int xx;
   
       he->tag = RPMTAG_FILECOLORS;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       if (xx && he_p.ptr != NULL && he->c > 0) {
   	int i;
   	for (i = 0; i < he->c; i++)
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/hdrinline.h
  ============================================================================
  $ cvs diff -u -r1.19 -r1.20 hdrinline.h
  --- rpm/rpmdb/hdrinline.h	17 Oct 2007 00:32:26 -0000	1.19
  +++ rpm/rpmdb/hdrinline.h	17 Oct 2007 20:04:53 -0000	1.20
  @@ -255,21 +255,16 @@
    * Retrieve extension or tag value.
    *
    * @param h		header
  - * @param tag		tag
  - * @retval *type	tag value data type (or NULL)
  - * @retval *p		tag value(s) (or NULL)
  - * @retval *c		number of values (or NULL)
  + * @param he		tag container
  + * @param flags		(unused)
    * @return		1 on success, 0 on failure
    */
   /*@unused@*/ static inline
  -int headerGetExtension(Header h, int_32 tag,
  -			/*@null@*/ /*@out@*/ hTYP_t type,
  -			/*@null@*/ /*@out@*/ hRET_t * p,
  -			/*@null@*/ /*@out@*/ hCNT_t c)
  -	/*@modifies *type, *p, *c @*/
  +int headerGetExtension(Header h, HE_t he, /*@unused@*/ unsigned int flags)
  +	/*@modifies *he @*/
   {
       if (h == NULL) return 0;
  -    return (h2hv(h)->hdrext) (h, tag, type, p, c);
  +    return (h2hv(h)->hdrext) (h, he->tag, &he->t, he->p, &he->c);
   }
   
   /** \ingroup header
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/header.h
  ============================================================================
  $ cvs diff -u -r1.40 -r1.41 header.h
  --- rpm/rpmdb/header.h	17 Oct 2007 18:32:57 -0000	1.40
  +++ rpm/rpmdb/header.h	17 Oct 2007 20:04:53 -0000	1.41
  @@ -364,25 +364,16 @@
       void * (*HFD_t) (/*@only@*/ /*@null@*/ const void * data, rpmTagType type)
   	/*@modifies data @*/;
   
  -/**
  - * Prototype for headerGetEntry() vector.
  - *
  - * Will never return RPM_I18NSTRING_TYPE! RPM_STRING_TYPE elements with
  - * RPM_I18NSTRING_TYPE equivalent entries are translated (if HEADER_I18NTABLE
  - * entry is present).
  +/*
  + * Retrieve extension or tag value.
    *
    * @param h		header
  - * @param tag		tag
  - * @retval *type	tag value data type (or NULL)
  - * @retval *p		tag value(s) (or NULL)
  - * @retval *c		number of values (or NULL)
  + * @param he		tag container
  + * @param flags		(unused)
    * @return		1 on success, 0 on failure
    */
  -typedef int (*HGE_t) (Header h, rpmTag tag,
  -			/*@null@*/ /*@out@*/ hTYP_t t,
  -			/*@null@*/ /*@out@*/ hRET_t * p,
  -			/*@null@*/ /*@out@*/ hCNT_t c)
  -	/*@modifies *t, *p, *c @*/;
  +typedef int (*HGE_t) (Header h, HE_t he, unsigned int flags)
  +	/*@modifies *he @*/;
   
   /**
    * Prototype for headerAddEntry() vector.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/pkgio.c
  ============================================================================
  $ cvs diff -u -r1.19 -r1.20 pkgio.c
  --- rpm/rpmdb/pkgio.c	17 Oct 2007 18:32:57 -0000	1.19
  +++ rpm/rpmdb/pkgio.c	17 Oct 2007 20:04:53 -0000	1.20
  @@ -154,7 +154,7 @@
   	he->tag = RPMTAG_PUBKEYS;
   	mi = rpmdbInitIterator(rpmtsGetRdb(ts), RPMTAG_PUBKEYS, sigp->signid, sizeof(sigp->signid));
   	while ((h = rpmdbNextIterator(mi)) != NULL) {
  -	    if (!hge(h, he->tag, &he->t, he->p, &he->c))
  +	    if (!hge(h, he, 0))
   		continue;
   	    hx = rpmdbGetIteratorOffset(mi);
   	    ix = rpmdbGetIteratorFileNum(mi);
  @@ -708,7 +708,7 @@
   	/* Print package component sizes. */
   
   	he->tag = RPMSIGTAG_SIZE;
  -	xx = hge(sigh, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(sigh, he, 0);
   	if (xx) {
   	    size_t datasize = *he_p.ui32p;
   	    rc = printSize(fd, sigSize, pad, datasize);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/rpmdb.c
  ============================================================================
  $ cvs diff -u -r1.190 -r1.191 rpmdb.c
  --- rpm/rpmdb/rpmdb.c	17 Oct 2007 18:32:57 -0000	1.190
  +++ rpm/rpmdb/rpmdb.c	17 Oct 2007 20:04:53 -0000	1.191
  @@ -882,7 +882,7 @@
   	    xx = Fclose(fd);
   	    fd = NULL;
   	    he->tag = RPMTAG_INSTALLTID;
  -	    if (hge(h, he->tag, &he->t, he->p, &he->c)) {
  +	    if (hge(h, he, 0)) {
   		struct utimbuf stamp;
   		stamp.actime = *he_p.i32p;
   		stamp.modtime = *he_p.i32p;
  @@ -1510,13 +1510,13 @@
   	}
   
   	he->tag = RPMTAG_BASENAMES;
  -	xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(h, he, 0);
   	baseNames = he_p.argv;
   	he->tag = RPMTAG_DIRNAMES;
  -	xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(h, he, 0);
   	dirNames = he_p.argv;
   	he->tag = RPMTAG_DIRINDEXES;
  -	xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(h, he, 0);
   	dirIndexes = he_p.ui32p;
   
   	do {
  @@ -2175,7 +2175,7 @@
   
   	he->tag = mire->tag;
   
  -	if (!hge(mi->mi_h, he->tag, &he->t, he->p, &he->c)) {
  +	if (!hge(mi->mi_h, he, 0)) {
   	    if (he->tag != RPMTAG_EPOCH) {
   		ntags++;
   		continue;
  @@ -2817,7 +2817,7 @@
   #endif
   
       he->tag = RPMTAG_NVRA;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       rpmlog(RPMLOG_DEBUG, "  --- h#%8u %s\n", hdrNum, he_p.str);
       he_p.ptr = _free(he_p.ptr);
   
  @@ -2877,7 +2877,7 @@
   		continue;
   		/*@notreached@*/ /*@switchbreak@*/ break;
   	    default:
  -		if (!hge(h, he->tag, &he->t, he->p, &he->c))
  +		if (!hge(h, he, 0))
   		    continue;
   		/*@switchbreak@*/ break;
   
  @@ -3151,15 +3151,15 @@
        */
   
       he->tag = RPMTAG_BASENAMES;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       baseNames = he_p.argv;
       count = he->c;
   #endif
       he->tag = RPMTAG_DIRNAMES;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       dirNames = he_p.argv;
       he->tag = RPMTAG_DIRINDEXES;
  -    xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +    xx = hge(h, he, 0);
       dirIndexes = he_p.ui32p;
   
       (void) blockSignals(db, &signalMask);
  @@ -3332,11 +3332,15 @@
   		/*@switchbreak@*/ break;
   #endif
   	    case RPMTAG_REQUIRENAME:
  -		xx = hge(h, RPMTAG_REQUIREFLAGS, NULL, &requireFlags, NULL);
  -		xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +		he->tag = RPMTAG_REQUIREFLAGS;
  +		he->p = &requireFlags;
  +		xx = hge(h, he, 0);
  +		he->tag = RPMTAG_REQUIRENAME;
  +		he->p = &he_p;
  +		xx = hge(h, he, 0);
   		/*@switchbreak@*/ break;
   	    default:
  -		xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +		xx = hge(h, he, 0);
   		/*@switchbreak@*/ break;
   	    }
   
  @@ -3638,13 +3642,13 @@
   
   	/* Compute fingerprints for this installed header's matches */
   	he->tag = RPMTAG_BASENAMES;
  -	xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(h, he, 0);
   	fullBaseNames = he_p.argv;
   	he->tag = RPMTAG_DIRNAMES;
  -	xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(h, he, 0);
   	dirNames = he_p.argv;
   	he->tag = RPMTAG_DIRINDEXES;
  -	xx = hge(h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(h, he, 0);
   	fullDirIndexes = he_p.ui32p;
   
   	baseNames = xcalloc(num, sizeof(*baseNames));
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/signature.c
  ============================================================================
  $ cvs diff -u -r1.12 -r1.13 signature.c
  --- rpm/rpmdb/signature.c	17 Oct 2007 18:32:57 -0000	1.12
  +++ rpm/rpmdb/signature.c	17 Oct 2007 20:04:53 -0000	1.13
  @@ -558,8 +558,7 @@
   	    DIGEST_CTX ctx;
   	
   	    he->tag = RPMTAG_HEADERIMMUTABLE;
  -	    if (!hge(h, he->tag, &he->t, he->p, &he->c)
  -	     ||  he_p.ptr == NULL)
  +	    if (!hge(h, he, 0) || he_p.ptr == NULL)
   	    {
   		h = headerFree(h);
   		goto exit;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/tools/rpmcache.c
  ============================================================================
  $ cvs diff -u -r2.19 -r2.20 rpmcache.c
  --- rpm/tools/rpmcache.c	17 Oct 2007 18:32:58 -0000	2.19
  +++ rpm/tools/rpmcache.c	17 Oct 2007 20:04:53 -0000	2.20
  @@ -133,7 +133,7 @@
   
   	/* --- Check that identical package is not already cached. */
   	he->tag = RPMTAG_SIGMD5;
  -	xx = hge(ip->h, he->tag, &he->t, he->p, &he->c);
  +	xx = hge(ip->h, he, 0);
   	md5 = he_p.ui8p;
    	if (!xx || md5 == NULL) {
   	    md5 = _free(md5);
  @@ .
Received on Wed Oct 17 22:04:54 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.