RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES rpm/build/ files.c rpm/rpmdb/ hdrfmt.c pkgio.c

From: Jeff Johnson <jbj@rpm5.org>
Date: Mon 26 Nov 2007 - 07:15:34 CET
Message-Id: <20071126061534.DA1B534847C@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:   26-Nov-2007 07:15:34
  Branch: HEAD                             Handle: 2007112606153400

  Modified files:
    rpm                     CHANGES
    rpm/build               files.c
    rpm/rpmdb               hdrfmt.c pkgio.c

  Log:
    - 1 down, 2 to go, to get rid of headerGetEntry.

  Summary:
    Revision    Changes     Path
    1.1891      +1  -0      rpm/CHANGES
    1.297       +3  -3      rpm/build/files.c
    1.45        +8  -6      rpm/rpmdb/hdrfmt.c
    1.61        +1  -1      rpm/rpmdb/pkgio.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1890 -r1.1891 CHANGES
  --- rpm/CHANGES	26 Nov 2007 05:42:23 -0000	1.1890
  +++ rpm/CHANGES	26 Nov 2007 06:15:34 -0000	1.1891
  @@ -1,4 +1,5 @@
   5.0a2 -> 5.0a3:
  +    - jbj: 1 down, 2 to go, to get rid of headerGetEntry.
       - jbj: limit headerGetEntry usage to -lrpmdb only.
       - jbj: Eliminate header.h and hdrinline.h.
       - jbj: insure that HE_t in headerGet/headerNext is initialized sanely.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/files.c
  ============================================================================
  $ cvs diff -u -r1.296 -r1.297 files.c
  --- rpm/build/files.c	26 Nov 2007 05:16:49 -0000	1.296
  +++ rpm/build/files.c	26 Nov 2007 06:15:34 -0000	1.297
  @@ -1647,10 +1647,10 @@
       *d = '\0';
   
       fi->bnl = xmalloc(fi->fc * (sizeof(*fi->bnl) + sizeof(*fi->dil)));
  -/*@-dependenttrans@*/ /* FIX: artifact of spoofing headerGetEntry */
  +/*@-dependenttrans@*/ /* FIX: artifact of spoofing header tag store */
       fi->dil = (!scareMem)
   	? xcalloc(sizeof(*fi->dil), fi->fc)
  -	: (int *)(fi->bnl + fi->fc);
  +	: (uint32_t *)(fi->bnl + fi->fc);
   /*@=dependenttrans@*/
   
       /* XXX Insure at least 1 byte is always allocated. */
  @@ -1688,7 +1688,7 @@
   
   	/* Create disk directory and base name. */
   	fi->dil[i] = i;
  -/*@-dependenttrans@*/ /* FIX: artifact of spoofing headerGetEntry */
  +/*@-dependenttrans@*/ /* FIX: artifact of spoofing header tag store */
   	fi->dnl[fi->dil[i]] = d;
   /*@=dependenttrans@*/
   	d = stpcpy(d, flp->diskURL);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/hdrfmt.c
  ============================================================================
  $ cvs diff -u -r1.44 -r1.45 hdrfmt.c
  --- rpm/rpmdb/hdrfmt.c	26 Nov 2007 05:16:52 -0000	1.44
  +++ rpm/rpmdb/hdrfmt.c	26 Nov 2007 06:15:34 -0000	1.45
  @@ -1254,16 +1254,18 @@
   	const char * msgkey;
   	const char * msgid;
   
  -	{   const char * tn = tagName(he->tag);
  -	    rpmTagData n = { .ptr = NULL };
  +	{   HE_t nhe = memset(alloca(sizeof(*nhe)), 0, sizeof(*nhe));
  +	    const char * tn = tagName(he->tag);
   	    char * mk;
   	    size_t nb = sizeof("()");
  -	    int xx = headerGetEntry(h, RPMTAG_NAME, NULL, &n, NULL);
  -	    xx = 0;	/* XXX keep gcc quiet */
  +	    int xx;
  +	    nhe->tag = RPMTAG_NAME;
  +	    xx = headerGet(h, nhe, 0);
   	    if (tn)	nb += strlen(tn);
  -	    if (n.str)	nb += strlen(n.str);
  +	    if (nhe->p.str)	nb += strlen(nhe->p.str);
   	    mk = alloca(nb);
  -	    sprintf(mk, "%s(%s)", (n.str ? n.str : ""), (tn ? tn : ""));
  +	    sprintf(mk, "%s(%s)", (nhe->p.str ? nhe->p.str : ""), (tn ? tn : ""));
  +	    nhe->p.ptr = _free(nhe->p.ptr);
   	    msgkey = mk;
   	}
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/pkgio.c
  ============================================================================
  $ cvs diff -u -r1.60 -r1.61 pkgio.c
  --- rpm/rpmdb/pkgio.c	24 Nov 2007 22:07:30 -0000	1.60
  +++ rpm/rpmdb/pkgio.c	26 Nov 2007 06:15:34 -0000	1.61
  @@ -867,7 +867,7 @@
   /*===============================================*/
   
   /**
  - * Check header consistency, performing headerGetEntry() the hard way.
  + * Check header consistency, performing headerGet() the hard way.
    *
    * Sanity checks on the header are performed while looking for a
    * header-only digest or signature to verify the blob. If found,
  @@ .
Received on Mon Nov 26 07:15:34 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.