RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES rpm/lib/ package.c rpm/python/ header-py.c rpm...

From: Jeff Johnson <jbj@rpm5.org>
Date: Thu 22 Nov 2007 - 20:27:15 CET
Message-Id: <20071122192715.4298234845C@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:   22-Nov-2007 20:27:15
  Branch: HEAD                             Handle: 2007112219271301

  Modified files:
    rpm                     CHANGES
    rpm/lib                 package.c
    rpm/python              header-py.c rpmts-py.c
    rpm/rpmdb               hdrinline.h header.c header.h pkgio.c

  Log:
    - eliminate hTYP_t and hCNT_t typedefs everywhere.
    - fix: python: pass pgpDig, not rpmts, as 1st arg to  headerCheck.
    - fix: python: include pkgio.h for rpmpkgRead prototype.
    - fix: package.c: pass pointer to msg, not NULL, calling rpmpkgRead.

  Summary:
    Revision    Changes     Path
    1.1868      +4  -0      rpm/CHANGES
    2.191       +1  -1      rpm/lib/package.c
    1.81        +1  -0      rpm/python/header-py.c
    1.79        +5  -1      rpm/python/rpmts-py.c
    1.36        +4  -4      rpm/rpmdb/hdrinline.h
    1.125       +7  -7      rpm/rpmdb/header.c
    1.69        +6  -8      rpm/rpmdb/header.h
    1.54        +1  -1      rpm/rpmdb/pkgio.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1867 -r1.1868 CHANGES
  --- rpm/CHANGES	22 Nov 2007 18:50:24 -0000	1.1867
  +++ rpm/CHANGES	22 Nov 2007 19:27:13 -0000	1.1868
  @@ -1,4 +1,8 @@
   5.0a2 -> 5.0a3:
  +    - jbj: eliminate hTYP_t and hCNT_t typedefs everywhere.
  +    - jbj: fix: python: pass pgpDig, not rpmts, as 1st arg to  headerCheck.
  +    - jbj: fix: python: include pkgio.h for rpmpkgRead prototype.
  +    - jbj: fix: package.c: pass pointer to msg, not NULL, calling rpmpkgRead.
       - jbj: eliminate rpm peculier int typedefs, use stdint types instead.
       - jbj: convert all remaining uses of int_XY to stdint types.
       - jbj: revert HEADER_XARALLOCATED gloopiness.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/package.c
  ============================================================================
  $ cvs diff -u -r2.190 -r2.191 package.c
  --- rpm/lib/package.c	22 Nov 2007 18:50:25 -0000	2.190
  +++ rpm/lib/package.c	22 Nov 2007 19:27:14 -0000	2.191
  @@ -205,7 +205,7 @@
       nb = -fd->stats->ops[FDSTAT_READ].bytes;
       {	const char item[] = "Header";
   	msg = NULL;
  -	rc = rpmpkgRead(item, fd, &h, msg);
  +	rc = rpmpkgRead(item, fd, &h, &msg);
   	if (rc != RPMRC_OK) {
   	    rpmlog(RPMLOG_ERR, "%s: %s: %s\n", fn, item, msg);
   	    msg = _free(msg);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/python/header-py.c
  ============================================================================
  $ cvs diff -u -r1.80 -r1.81 header-py.c
  --- rpm/python/header-py.c	22 Nov 2007 18:50:27 -0000	1.80
  +++ rpm/python/header-py.c	22 Nov 2007 19:27:14 -0000	1.81
  @@ -9,6 +9,7 @@
   
   #include "legacy.h"
   #include "header_internal.h"	/* XXX HEADERFLAG_ALLOCATED */
  +#include "pkgio.h"		/* XXX rpmpkgRead */
   
   #include "rpmts.h"	/* XXX rpmtsCreate/rpmtsFree */
   #define	_RPMEVR_INTERNAL
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/python/rpmts-py.c
  ============================================================================
  $ cvs diff -u -r1.78 -r1.79 rpmts-py.c
  --- rpm/python/rpmts-py.c	22 Nov 2007 18:50:27 -0000	1.78
  +++ rpm/python/rpmts-py.c	22 Nov 2007 19:27:14 -0000	1.79
  @@ -949,6 +949,7 @@
       const char * msg = NULL;
       const void * uh;
       int uc;
  +    pgpDig dig;
       rpmRC rpmrc;
       char * kwlist[] = {"headers", NULL};
   
  @@ -969,7 +970,9 @@
       uh = PyString_AsString(blob);
       uc = PyString_Size(blob);
   
  -    rpmrc = headerCheck(s->ts, uh, uc, &msg);
  +    dig = pgpDigNew(rpmtsVSFlags(s->ts));
  +    rpmrc = headerCheck(dig, uh, uc, &msg);
  +    dig = pgpDigFree(dig);
   
       switch (rpmrc) {
       case RPMRC_OK:
  @@ -978,6 +981,7 @@
   	break;
   
       case RPMRC_NOKEY:
  +	/* XXX note "availaiable", the script kiddies need the misspelling. */
   	PyErr_SetString(pyrpmError, "public key not availaiable");
   	break;
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/hdrinline.h
  ============================================================================
  $ cvs diff -u -r1.35 -r1.36 hdrinline.h
  --- rpm/rpmdb/hdrinline.h	21 Nov 2007 00:25:04 -0000	1.35
  +++ rpm/rpmdb/hdrinline.h	22 Nov 2007 19:27:14 -0000	1.36
  @@ -362,9 +362,9 @@
    */
   /*@unused@*/ static inline
   int headerGetEntry(Header h, uint32_t tag,
  -			/*@null@*/ /*@out@*/ hTYP_t type,
  +			/*@null@*/ /*@out@*/ rpmTagType * type,
   			/*@null@*/ /*@out@*/ hRET_t * p,
  -			/*@null@*/ /*@out@*/ hCNT_t c)
  +			/*@null@*/ /*@out@*/ rpmTagCount * c)
   	/*@modifies *type, *p, *c @*/
   {
       if (h == NULL) return 0;
  @@ -567,9 +567,9 @@
   /*@unused@*/ static inline
   int headerNextIterator(HeaderIterator hi,
   		/*@null@*/ /*@out@*/ hTAG_t tag,
  -		/*@null@*/ /*@out@*/ hTYP_t type,
  +		/*@null@*/ /*@out@*/ rpmTagType * type,
   		/*@null@*/ /*@out@*/ const void * p,
  -		/*@null@*/ /*@out@*/ hCNT_t c)
  +		/*@null@*/ /*@out@*/ rpmTagCount * c)
   	/*@modifies hi, *tag, *type, *p, *c @*/
   {
       hRET_t **q = (void *)&p;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/header.c
  ============================================================================
  $ cvs diff -u -r1.124 -r1.125 header.c
  --- rpm/rpmdb/header.c	22 Nov 2007 18:50:27 -0000	1.124
  +++ rpm/rpmdb/header.c	22 Nov 2007 19:27:14 -0000	1.125
  @@ -1757,9 +1757,9 @@
    */
   static
   int headerGetExtension(Header h, uint32_t tag,
  -			/*@null@*/ /*@out@*/ hTYP_t type,
  +			/*@null@*/ /*@out@*/ rpmTagType * type,
   			/*@null@*/ /*@out@*/ hRET_t * p,
  -			/*@null@*/ /*@out@*/ hCNT_t c)
  +			/*@null@*/ /*@out@*/ rpmTagCount * c)
   	/*@globals headerCompoundFormats @*/
   	/*@modifies *type, *p, *c @*/
   	/*@requires maxSet(type) >= 0 /\ maxSet(p) >= 0 /\ maxSet(c) >= 0 @*/
  @@ -1862,9 +1862,9 @@
    */
   static
   int headerGetEntry(Header h, uint32_t tag,
  -			/*@null@*/ /*@out@*/ hTYP_t type,
  +			/*@null@*/ /*@out@*/ rpmTagType * type,
   			/*@null@*/ /*@out@*/ hRET_t * p,
  -			/*@null@*/ /*@out@*/ hCNT_t c)
  +			/*@null@*/ /*@out@*/ rpmTagCount * c)
   	/*@modifies *type, *p, *c @*/
   	/*@requires maxSet(type) >= 0 /\ maxSet(p) >= 0 /\ maxSet(c) >= 0 @*/
   {
  @@ -2427,9 +2427,9 @@
   static
   int headerNextIterator(HeaderIterator hi,
   		/*@null@*/ /*@out@*/ hTAG_t tag,
  -		/*@null@*/ /*@out@*/ hTYP_t type,
  +		/*@null@*/ /*@out@*/ rpmTagType * type,
   		/*@null@*/ /*@out@*/ hRET_t * p,
  -		/*@null@*/ /*@out@*/ hCNT_t c)
  +		/*@null@*/ /*@out@*/ rpmTagCount * c)
   	/*@modifies hi, *tag, *type, *p, *c @*/
   	/*@requires maxSet(tag) >= 0 /\ maxSet(type) >= 0
   		/\ maxSet(p) >= 0 /\ maxSet(c) >= 0 @*/
  @@ -3925,7 +3925,7 @@
   	rpmTagCount c;
   	if (headerIsEntry(headerTo, *tagno))
   	    continue;
  -	if (!headerGetEntry(headerFrom, *tagno, (hTYP_t)&t, &p, &c))
  +	if (!headerGetEntry(headerFrom, *tagno, &t, &p, &c))
   	    continue;
   	(void) headerAddEntry(headerTo, *tagno, t, p.ptr, c);
   	p.ptr = headerFreeData(p.ptr, t);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/header.h
  ============================================================================
  $ cvs diff -u -r1.68 -r1.69 header.h
  --- rpm/rpmdb/header.h	22 Nov 2007 18:50:27 -0000	1.68
  +++ rpm/rpmdb/header.h	22 Nov 2007 19:27:14 -0000	1.69
  @@ -157,9 +157,7 @@
   /** \ingroup header
    */
   typedef uint32_t *	hTAG_t;
  -typedef rpmTagType *	hTYP_t;
   typedef rpmTagData *	hPTR_t;
  -typedef rpmTagCount *	hCNT_t;
   
   /** \ingroup header
    */
  @@ -536,9 +534,9 @@
    */
   typedef
   int (*HDRext) (Header h, uint32_t tag,
  -			/*@null@*/ /*@out@*/ hTYP_t type,
  +			/*@null@*/ /*@out@*/ rpmTagType * type,
   			/*@null@*/ /*@out@*/ hRET_t * p,
  -			/*@null@*/ /*@out@*/ hCNT_t c)
  +			/*@null@*/ /*@out@*/ rpmTagCount * c)
   	/*@modifies *type, *p, *c @*/;
   
   /** \ingroup header
  @@ -556,9 +554,9 @@
    */
   typedef
   int (*HDRget) (Header h, uint32_t tag,
  -			/*@null@*/ /*@out@*/ hTYP_t type,
  +			/*@null@*/ /*@out@*/ rpmTagType * type,
   			/*@null@*/ /*@out@*/ hRET_t * p,
  -			/*@null@*/ /*@out@*/ hCNT_t c)
  +			/*@null@*/ /*@out@*/ rpmTagCount * c)
   	/*@modifies *type, *p, *c @*/;
   
   /** \ingroup header
  @@ -719,9 +717,9 @@
   typedef
   int (*HDRnextiter) (HeaderIterator hi,
   		/*@null@*/ /*@out@*/ hTAG_t tag,
  -		/*@null@*/ /*@out@*/ hTYP_t type,
  +		/*@null@*/ /*@out@*/ rpmTagType * type,
   		/*@null@*/ /*@out@*/ hRET_t * p,
  -		/*@null@*/ /*@out@*/ hCNT_t c)
  +		/*@null@*/ /*@out@*/ rpmTagCount * c)
   	/*@modifies hi, *tag, *type, *p, *c @*/;
   
   /** \ingroup header
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/pkgio.c
  ============================================================================
  $ cvs diff -u -r1.53 -r1.54 pkgio.c
  --- rpm/rpmdb/pkgio.c	22 Nov 2007 18:50:27 -0000	1.53
  +++ rpm/rpmdb/pkgio.c	22 Nov 2007 19:27:14 -0000	1.54
  @@ -502,7 +502,7 @@
   	size_t nb = 0;
   	if ((xx = rpmxarNext(xar)) != 0)	return RPMRC_FAIL;
   	if ((xx = rpmxarPull(xar, "Lead")) != 0) return RPMRC_FAIL;
  -	(void) rpmxarSwapBuf(xar, NULL, 0, &b, &nb);
  +	(void) rpmxarSwapBuf(xar, NULL, 0, (char **)&b, &nb);
   	if (nb != sizeof(*l)) {
   	    b = _free(b);
   	    (void) snprintf(buf, sizeof(buf),
  @@ .
Received on Thu Nov 22 20:27:15 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.