RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES rpm/lib/ rpmts.c rpmts.h

From: Jeff Johnson <jbj@rpm5.org>
Date: Sat 29 Sep 2007 - 01:27:26 CEST
Message-Id: <20070928232726.EC55B348469@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:   29-Sep-2007 01:27:26
  Branch: HEAD                             Handle: 2007092900272600

  Modified files:
    rpm                     CHANGES
    rpm/lib                 rpmts.c rpmts.h

  Log:
    - finish refactoring vsflags out of rpmts.

  Summary:
    Revision    Changes     Path
    1.1643      +1  -0      rpm/CHANGES
    2.98        +5  -17     rpm/lib/rpmts.c
    2.74        +0  -7      rpm/lib/rpmts.h
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1642 -r1.1643 CHANGES
  --- rpm/CHANGES	28 Sep 2007 22:36:15 -0000	1.1642
  +++ rpm/CHANGES	28 Sep 2007 23:27:26 -0000	1.1643
  @@ -1,4 +1,5 @@
   4.5 -> 5.0:
  +    - jbj: finish refactoring vsflags out of rpmts.
       - rpm.org: rename fileTypes_e and whatis() (for name spacing).
       - jbj: move (largely unused) fileTypes into rpmfi.h.
       - jbj: remove whatis() from rpmlib, use S_ISFOO() instead.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmts.c
  ============================================================================
  $ cvs diff -u -r2.97 -r2.98 rpmts.c
  --- rpm/lib/rpmts.c	11 Sep 2007 06:42:23 -0000	2.97
  +++ rpm/lib/rpmts.c	28 Sep 2007 23:27:26 -0000	2.98
  @@ -144,7 +144,7 @@
   {
       void *lock = rpmtsAcquireLock(ts);
       int rc;
  -    if (!(ts->vsflags & RPMVSF_NOHDRCHK))
  +    if (!(rpmtsVSFlags(ts) & RPMVSF_NOHDRCHK))
   	rc = rpmdbRebuild(ts->rootDir, ts, headerCheck);
       else
   	rc = rpmdbRebuild(ts->rootDir, NULL, NULL);
  @@ -230,7 +230,7 @@
       mi = rpmdbInitIterator(ts->rdb, rpmtag, keyp, keylen);
   
       /* Verify header signature/digest during retrieve (if not disabled). */
  -    if (mi && !(ts->vsflags & RPMVSF_NOHDRCHK))
  +    if (mi && !(rpmtsVSFlags(ts) & RPMVSF_NOHDRCHK))
   	(void) rpmdbSetHdrChk(mi, ts, headerCheck);
   
       /* Select specified arch only. */
  @@ -890,22 +890,12 @@
   
   rpmVSFlags rpmtsVSFlags(rpmts ts)
   {
  -    rpmVSFlags vsflags = 0;
  -    if (ts != NULL)
  -	vsflags = ts->vsflags;
  -    return vsflags;
  +    return pgpGetVSFlags(rpmtsDig(ts));
   }
   
   rpmVSFlags rpmtsSetVSFlags(rpmts ts, rpmVSFlags vsflags)
   {
  -    rpmVSFlags ovsflags = 0;
  -    if (ts != NULL) {
  -	ovsflags = ts->vsflags;
  -	ts->vsflags = vsflags;
  -	if (ts->dig)	/* XXX W2DO? */
  -	    (void) pgpSetVSFlags(ts->dig, vsflags);
  -    }
  -    return ovsflags;
  +    return pgpSetVSFlags(rpmtsDig(ts), vsflags);
   }
   
   /*
  @@ -1149,12 +1139,10 @@
   {
   /*@-mods@*/ /* FIX: hide lazy malloc for now */
       if (ts->dig == NULL) {
  -	ts->dig = pgpNewDig(ts->vsflags);
  +	ts->dig = pgpNewDig(0);
   	(void) pgpSetFindPubkey(ts->dig, (int (*)(void *, void *))rpmtsFindPubkey, ts);
       }
   /*@=mods@*/
  -    if (ts->dig == NULL)
  -	return NULL;
       return ts->dig;
   }
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmts.h
  ============================================================================
  $ cvs diff -u -r2.73 -r2.74 rpmts.h
  --- rpm/lib/rpmts.h	9 Sep 2007 20:32:42 -0000	2.73
  +++ rpm/lib/rpmts.h	28 Sep 2007 23:27:26 -0000	2.74
  @@ -210,8 +210,6 @@
       uint_32 color;		/*!< Transaction color bits. */
       uint_32 prefcolor;		/*!< Preferred file color. */
   
  -    rpmVSFlags vsflags;		/*!< Signature/digest verification flags. */
  -
   /*@observer@*/ /*@dependent@*/ /*@null@*/
       const char * fn;		/*!< Current package fn. */
   
  @@ -228,11 +226,6 @@
   /*@null@*/
       Spec spec;			/*!< Spec file control structure. */
   
  -#ifdef	DYING
  -/*@kept@*/ /*@null@*/
  -    rpmtsScore score;		/*!< Transaction score (autorollback). */
  -#endif
  -
       uint_32 arbgoal;		/*!< Autorollback goal */
   
   /*@refs@*/
  @@ .
Received on Sat Sep 29 01:27:27 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.