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:   31-May-2008 23:03:41
  Branch: rpm-5_0                          Handle: 2008053121033901

  Modified files:           (Branch: rpm-5_0)
    rpm                     CHANGES
    rpm/rpmdb               db3.c

  Log:
    - jbj: rpmdb: fix: limit RUNRECOVERY attempts, not every lazy open.

  Summary:
    Revision    Changes     Path
    1.2054.2.71 +1  -0      rpm/CHANGES
    1.84.2.1    +5  -0      rpm/rpmdb/db3.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.2054.2.70 -r1.2054.2.71 CHANGES
  --- rpm/CHANGES       31 May 2008 18:36:33 -0000      1.2054.2.70
  +++ rpm/CHANGES       31 May 2008 21:03:39 -0000      1.2054.2.71
  @@ -1,4 +1,5 @@
   5.0.3 -> 5.0.4:
  +    - jbj: rpmdb: fix: limit RUNRECOVERY attempts, not every lazy open.
       - jbj: backport assorted rpmio changes from HEAD to stay in sync.
       - jbj: make sure the open path is set when using [bgl]zdOpen vector too.
       - jbj: lzdio: rework the layering to be more similar to gzdio/bzdio.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/db3.c
  ============================================================================
  $ cvs diff -u -r1.84 -r1.84.2.1 db3.c
  --- rpm/rpmdb/db3.c   18 Dec 2007 19:40:54 -0000      1.84
  +++ rpm/rpmdb/db3.c   31 May 2008 21:03:40 -0000      1.84.2.1
  @@ -1295,12 +1295,17 @@
       if (dbi->dbi_use_dbenv) {
        /[EMAIL PROTECTED]@*/
        if (rpmdb->db_dbenv == NULL) {
  +         static int runrecoverycount = 0;
            rc = db_init(dbi, dbhome, dbfile, dbsubfile, &dbenv);
            switch (rc) {
            default:
                break;
   
            case DB_RUNRECOVERY:
  +             if (runrecoverycount++ >= 1) {
  +                 rpmlog(RPMLOG_ERR, _("RUNRECOVERY failed, exiting ...\n"));
  +                exit(EXIT_FAILURE);
  +             }
                rpmlog(RPMLOG_ERR, _("Runnning db->verify ...\n"));
                rpmdb = rpmdbLink(rpmdb, "DB_RUNRECOVERY");
                rpmdb->db_remove_env = 1;
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                [email protected]

Reply via email to