RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  [EMAIL PROTECTED]
  Module: rpm                              Date:   18-May-2008 16:35:21
  Branch: rpm-5_1                          Handle: 2008051814352001

  Modified files:           (Branch: rpm-5_1)
    rpm                     CHANGES
    rpm/lib                 rpmchecksig.c
    rpm/rpmdb               pkgio.c rpmdb.c

  Log:
    - jbj: add a missing newline to a debug message.
    - jbj: revert rpmtsOpenDB on --checksig path, rely on the lazy open
        in rpmtsFindPubkey instead.
    - jbj: fix: rpm -qp returns NOKEY because rpmdb is not yet open. Do a lazy
        open in rpmtsFindPubkey.

  Summary:
    Revision    Changes     Path
    1.2288.2.20 +5  -0      rpm/CHANGES
    1.215.2.1   +0  -6      rpm/lib/rpmchecksig.c
    1.78.2.1    +11 -0      rpm/rpmdb/pkgio.c
    1.246.2.1   +2  -2      rpm/rpmdb/rpmdb.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.2288.2.19 -r1.2288.2.20 CHANGES
  --- rpm/CHANGES       18 May 2008 14:27:41 -0000      1.2288.2.19
  +++ rpm/CHANGES       18 May 2008 14:35:20 -0000      1.2288.2.20
  @@ -1,5 +1,10 @@
   
   5.1.1 -> 5.1.2:
  +    - jbj: add a missing newline to a debug message.
  +    - jbj: revert rpmtsOpenDB on --checksig path, rely on the lazy open
  +     in rpmtsFindPubkey instead.
  +    - jbj: fix: rpm -qp returns NOKEY because rpmdb is not yet open. Do a 
lazy
  +     open in rpmtsFindPubkey.
       - jbj: python: fix: insure that ts.setProbFilter() return is initialized.
       - jbj: fix: use rpmlog instead of rpmError for messages.
       - glen: print error when makeTempPath fails due missing temp dir
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmchecksig.c
  ============================================================================
  $ cvs diff -u -r1.215 -r1.215.2.1 rpmchecksig.c
  --- rpm/lib/rpmchecksig.c     2 Apr 2008 20:34:18 -0000       1.215
  +++ rpm/lib/rpmchecksig.c     18 May 2008 14:35:21 -0000      1.215.2.1
  @@ -871,12 +871,6 @@
       int nodigests = !(qva->qva_flags & VERIFY_DIGEST);
       int nosignatures = !(qva->qva_flags & VERIFY_SIGNATURE);
   
  -    if ((rc = rpmtsOpenDB(ts, rpmtsDBMode(ts))) != RPMRC_OK) {
  -     /* XXX rpmtsOpenDB has reported the error. */
  -     res++;
  -     goto exit;
  -    }
  -
       {
        {   const char item[] = "Lead";
            msg = NULL;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/pkgio.c
  ============================================================================
  $ cvs diff -u -r1.78 -r1.78.2.1 pkgio.c
  --- rpm/rpmdb/pkgio.c 3 Apr 2008 16:40:46 -0000       1.78
  +++ rpm/rpmdb/pkgio.c 18 May 2008 14:35:20 -0000      1.78.2.1
  @@ -227,6 +227,17 @@
        rpmdbMatchIterator mi;
        Header h;
   
  +     /* XXX Do a lazy open if not done already. */
  +     if (ts->rdb == NULL) {
  +         xx = rpmdbOpen(ts->rootDir, &ts->rdb, ts->dbmode, 0644);
  +         if (xx) {
  +             const char * dn = rpmGetPath(ts->rootDir, "%{_dbpath}", NULL);
  +             rpmlog(RPMLOG_ERR,
  +                     _("cannot open Packages database in %s\n"), dn);
  +             dn = _free(dn);
  +         }
  +     }
  +
        /* Retrieve the pubkey that matches the signature. */
        he->tag = RPMTAG_PUBKEYS;
        mi = rpmdbInitIterator(rpmtsGetRdb(ts), RPMTAG_PUBKEYS, sigp->signid, 
sizeof(sigp->signid));
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/rpmdb.c
  ============================================================================
  $ cvs diff -u -r1.246 -r1.246.2.1 rpmdb.c
  --- rpm/rpmdb/rpmdb.c 23 Mar 2008 15:33:12 -0000      1.246
  +++ rpm/rpmdb/rpmdb.c 18 May 2008 14:35:20 -0000      1.246.2.1
  @@ -3347,9 +3347,9 @@
                    rpmrc = headerCheck(rpmtsDig(ts), data->data, data->size, 
&msg);
                    rpmtsCleanDig(ts);
                    lvl = (rpmrc == RPMRC_FAIL ? RPMLOG_ERR : RPMLOG_DEBUG);
  -                 rpmlog(lvl, "%s h#%8u %s",
  +                 rpmlog(lvl, "%s h#%8u %s\n",
                        (rpmrc == RPMRC_FAIL ? _("rpmdbAdd: skipping") : "  
+++"),
  -                             hdrNum, (msg ? msg : "\n"));
  +                             hdrNum, (msg ? msg : ""));
                    msg = _free(msg);
                }
   
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                [email protected]

Reply via email to