]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- silence DB_BUFFER_SMALL workaround messages, but increase additional auto/th/rpm-5.4.10-0.22
authorJan Rękorajski <baggins@pld-linux.org>
Thu, 20 Sep 2012 20:00:28 +0000 (22:00 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Thu, 20 Sep 2012 20:00:28 +0000 (22:00 +0200)
  memory to 4096 and number of iterations to 25
- rel 0.22

rpm-db_buffer_small.patch
rpm.spec

index 020aa976996f4a3beb23a640444e0ce2a7f1b688..0ca794a17e382b05a21bd24263cb45e8aba0d029 100644 (file)
@@ -7,8 +7,8 @@ See https://bugs.launchpad.net/rpm/+bug/934420 for more information.
 It appears to be some type of a bug in the BerkleyDB 5.3.x.  In an attempt
 to workaround the problem, when we encounter this situation we attempt
 to adjust the size of the mmap buffer until the call works, or we
-end up trying 10 times.  The new size is either the updated vp->size
-from the failed pget call, or the previous size + 1024.
+end up trying 25 times.  The new size is either the updated vp->size
+from the failed pget call, or the previous size + 4096.
 
 If DBI debugging is enabled, additional diagnostics are printed, otherwise
 a basic retry and success message is added to show that the failure was
@@ -39,24 +39,24 @@ Index: rpm-5.4.9/rpmdb/rpmdb.c
                    fprintf(stderr, "==> munmap(%p[%u]) error(%d): %s\n",
                        uh, (unsigned)uhlen, errno, strerror(errno));
 +              /* We want to be sure to limit the number of retry attempts to avoid a loop! */
-+              if (rc == DB_BUFFER_SMALL && retry < 10) {
++              if (rc == DB_BUFFER_SMALL && retry < 25) {
 +                 /* If we got a largr vp-size back, use that, otherwise increment the size by 1k */
-+                 uhlen = vp->size > uhlen ? vp->size : uhlen + 1024;
++                 uhlen = vp->size > uhlen ? vp->size : uhlen + 4096;
 +                 retry++;
-+                 if ((dbi)->dbi_debug)
++                 if (_rpmmi_debug || (dbi)->dbi_debug)
 +                     fprintf(stderr, "==> DB_BUFFER_SMALL orig requested (%d), configured (%d), forcing larger buffer (%d), new size (%d)\n",
 +                          origlen, vp->ulen, uhlen, vp->size);
 +                 else
-+                     fprintf(stderr, "==> retry (%d) db3cpget (%d)\n", retry, uhlen);
++                     rpmlog(RPMLOG_DEBUG, D_("==> retry (%d) db3cpget (%d)"), retry, uhlen);
 +                 goto retry_get;
 +              }
 +          }
 +          if (retry) {
-+              if ((dbi)->dbi_debug)
++              if (_rpmmi_debug || (dbi)->dbi_debug)
 +                 fprintf(stderr, "==> success orig requested (%d), configured buffer (%d), buffer (%d), size after dbiGet (%d)\n",
 +                      origlen, vp->ulen, uhlen, vp->size);
 +              else
-+                 fprintf(stderr, "==> success\n");
++                 rpmlog(RPMLOG_DEBUG, D_("==> success"));
            }
        }
      } else
@@ -64,6 +64,15 @@ Index: rpm-5.4.9/rpmdb/db3.c
 ===================================================================
 --- rpm-5.4.9.orig/rpmdb/db3.c
 +++ rpm-5.4.9/rpmdb/db3.c
+@@ -1442,6 +1442,8 @@
+       rc = dbcursor->pget(dbcursor, key, pkey, data, flags);
+       /* XXX DB_NOTFOUND can be returned */
+       _printit = (rc == DB_NOTFOUND ? 0 : _debug);
++      /* XXX Permit DB_BUFFER_SMALL to be returned (more restrictive?) */
++      _printit = (rc == DB_BUFFER_SMALL ? 0 : _printit);
+       rc = cvtdberr(dbi, "dbcursor->pget", rc, _printit);
+ #else
+       /* XXX db3 does DB_FIRST on uninitialized cursor */
 @@ -1452,7 +1452,7 @@ assert(db != NULL);
  #endif
      }
index 1efbb1936918db242da6c0469585b0d1ce8d9deb..5de0101744ded1be6fadd0a586829cc27aeb2070 100644 (file)
--- a/rpm.spec
+++ b/rpm.spec
@@ -43,7 +43,7 @@ Summary(ru.UTF-8):    Менеджер пакетов от RPM
 Summary(uk.UTF-8):     Менеджер пакетів від RPM
 Name:          rpm
 Version:       5.4.10
-Release:       0.21
+Release:       0.22
 License:       LGPL
 Group:         Base
 # http://rpm5.org/files/rpm/rpm-5.4/rpm-5.4.10-0.20120706.src.rpm
This page took 0.092064 seconds and 4 git commands to generate.