RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES rpm/rpmdb/ hdrfmt.c header.c rpm/ system.h

From: Jeff Johnson <jbj@rpm5.org>
Date: Sat 20 Oct 2007 - 16:09:08 CEST
Message-Id: <20071020140908.28DD734845A@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:   20-Oct-2007 16:09:08
  Branch: HEAD                             Handle: 2007102015090700

  Modified files:
    rpm                     CHANGES system.h
    rpm/rpmdb               hdrfmt.c header.c

  Log:
    - not yet for binary search retrieve using tagValue.
    - unbork --yaml.

  Summary:
    Revision    Changes     Path
    1.1739      +2  -0      rpm/CHANGES
    1.23        +6  -0      rpm/rpmdb/hdrfmt.c
    1.99        +8  -2      rpm/rpmdb/header.c
    2.94        +0  -4      rpm/system.h
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1738 -r1.1739 CHANGES
  --- rpm/CHANGES	20 Oct 2007 04:55:43 -0000	1.1738
  +++ rpm/CHANGES	20 Oct 2007 14:09:07 -0000	1.1739
  @@ -1,4 +1,6 @@
   4.5 -> 5.0:
  +    - jbj: not yet for binary search retrieve using tagValue.
  +    - jbj: unbork --yaml.
       - rpm.org: rpmpsi iterator.
       - jbj: mark myTagName() and myTagValue() linear lookup for destruction.
       - jbj: create rpmdb/rpmtag.h, split from lib/rpmlib.h.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/hdrfmt.c
  ============================================================================
  $ cvs diff -u -r1.22 -r1.23 hdrfmt.c
  --- rpm/rpmdb/hdrfmt.c	19 Oct 2007 19:03:11 -0000	1.22
  +++ rpm/rpmdb/hdrfmt.c	20 Oct 2007 14:09:07 -0000	1.23
  @@ -17,6 +17,8 @@
   
   #include "debug.h"
   
  +static int _jbj = 0;	/* XXX private debugging */
  +
   /*@access pgpDig @*/
   /*@access pgpDigParams @*/
   
  @@ -334,6 +336,8 @@
       int freeit = 0;
       int xx;
   
  +if (_jbj)
  +fprintf(stderr, " XML: tag %s(%d) %d %p[%d:%d] free %d\n", tagName(he->tag), he->tag, he->t, he->p.ptr, he->ix, he->c, he->freeData);
   assert(ix == 0);
   assert(he->t == RPM_STRING_TYPE || he->t == RPM_INT64_TYPE || he->t == RPM_BIN_TYPE);
       switch (he->t) {
  @@ -500,6 +504,8 @@
       int xx;
       int c;
   
  +if (_jbj)
  +fprintf(stderr, "YAML: tag %s(%d) %d %p[%d:%d] free %d\n", tagName(he->tag), he->tag, he->t, he->p.ptr, he->ix, he->c, he->freeData);
   assert(ix == 0);
   assert(he->t == RPM_STRING_TYPE || he->t == RPM_INT64_TYPE || he->t == RPM_BIN_TYPE);
       switch (he->t) {
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/header.c
  ============================================================================
  $ cvs diff -u -r1.98 -r1.99 header.c
  --- rpm/rpmdb/header.c	20 Oct 2007 01:47:17 -0000	1.98
  +++ rpm/rpmdb/header.c	20 Oct 2007 14:09:07 -0000	1.99
  @@ -2,6 +2,10 @@
    * \file rpmdb/header.c
    */
   
  +/* Tags are looked up with linear, not binary, search. */
  +/* XXX work in progress, caveat emptor. */
  +#define SUPPORT_LINEAR_TAGTABLE_LOOKUP	1
  +
   /* RPM - Copyright (C) 1995-2002 Red Hat Software */
   
   /* Data written to file descriptors is in network byte order.    */
  @@ -3478,7 +3482,7 @@
   	    he->p.str = "(none)";
   	}
       } else {
  -	/* XXX calling headerGetEntry for every element is a sorry waste. */
  +	/* XXX calling headerGetEntry for every element in array is pathetic. */
   	he->tag = tag->tag;
   	if (!headerGetEntry(hsa->h, he->tag, &he->t, &he->p, &he->c)) {
   	    he->c = 1;
  @@ -3532,7 +3536,8 @@
   	vhe->p.str = he->p.argv[element];
   	vhe->t = RPM_STRING_TYPE;
   	vhe->c = he->c;
  -	vhe->ix = -1;
  +	/* XXX TODO: force array representation? */
  +	vhe->ix = (he->c > 1 ? 0 : -1);
   	break;
       case RPM_STRING_TYPE:
   	vhe->p.str = he->p.str;
  @@ -3566,6 +3571,7 @@
   	vhe->t = RPM_INT64_TYPE;
   	vhe->p.i64p = &ival;
   	vhe->c = he->c;
  +	/* XXX TODO: force array representation? */
   	vhe->ix = (he->c > 1 ? 0 : -1);
   	break;
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/system.h
  ============================================================================
  $ cvs diff -u -r2.93 -r2.94 system.h
  --- rpm/system.h	20 Oct 2007 04:57:10 -0000	2.93
  +++ rpm/system.h	20 Oct 2007 14:09:07 -0000	2.94
  @@ -734,10 +734,6 @@
   
   #define	SUPPORT_RPMLEAD		0	/* XXX default is add lead. */
   
  -#if 0
  -#define SUPPORT_LINEAR_TAGTABLE_LOOKUP	0
  -#endif
  -
   /**
    * Turn off pgp/pgp5 signing (hasn't been looked at seriously for years).
    */
  @@ .
Received on Sat Oct 20 16:09:08 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.