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

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  j...@rpm5.org
  Module: rpm                              Date:   29-Aug-2014 16:31:48
  Branch: rpm-5_4                          Handle: 2014082914314800

  Modified files:           (Branch: rpm-5_4)
    rpm/lib                 rpmts.c

  Log:
    - bdb: add some spit polish.

  Summary:
    Revision    Changes     Path
    2.188.2.8   +11 -6      rpm/lib/rpmts.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmts.c
  ============================================================================
  $ cvs diff -u -r2.188.2.7 -r2.188.2.8 rpmts.c
  --- rpm/lib/rpmts.c   27 Aug 2014 14:32:53 -0000      2.188.2.7
  +++ rpm/lib/rpmts.c   29 Aug 2014 14:31:48 -0000      2.188.2.8
  @@ -157,13 +157,15 @@
       /* XXX best effort for deleted Seqno which cannot be flushed. */
       rc = rpmtxnCheckpoint(db);
       if (rc) {
  -     if (rc == ENOENT)
  -         rpmlog(RPMLOG_NOTICE, D_("rpmdb: Any missing indices will be 
recreated.\n"));
  -     else
  +     if (rc != ENOENT)
            goto exit;
  +     rpmlog(RPMLOG_NOTICE,
  +         D_("%s: Any missing indices will be recreated.\n", __FUNCTION__));
  +     rc = 0;
       }
   
  -  { size_t dbix;
  +  { dbiIndex dbi;
  +    size_t dbix;
       for (dbix = 0; dbix < db->db_ndbi; dbix++) {
        tagStore_t dbiTags = &db->db_tags[dbix];
   
  @@ -192,7 +194,9 @@
        }
   
        /* Open (and re-create) each index. */
  -     (void) dbiOpen(db, dbiTags->tag, db->db_flags);
  +     dbi = dbiOpen(db, dbiTags->tag, db->db_flags);
  +     if (dbi == NULL)
  +         rc += 1;
       }
       if (rpmIsVerbose())
        fprintf(stderr, "\n");
  @@ -212,10 +216,11 @@
       fn = _free(fn);
   
       rc = rpmtxnCheckpoint(db);
  +    /* XXX clean up logs? */
   
  +exit:
       xx = rpmtsCloseDB(ts);
   
  -exit:
       delMacro(NULL, "__nofsync");
       lock = rpmtsFreeLock(lock);
       return rc;
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to