]> git.pld-linux.org Git - packages/rpm.git/blob - rpm-db4.patch
- merged 4.1 patches... hope I didn't brake anything
[packages/rpm.git] / rpm-db4.patch
1 --- rpm-4.1/configure.ac.wiget  Thu Sep 19 00:14:53 2002
2 +++ rpm-4.1/configure.ac        Thu Sep 19 00:17:45 2002
3 @@ -437,10 +437,11 @@
4  if test $withval = no ; then
5  dnl ------------------ without internal db
6  
7 -AC_CHECK_HEADERS(db3/db.h)
8 +AC_CHECK_HEADERS(db.h)
9  
10  dnl Check for Berkeley db3 API.
11  AC_CHECK_FUNC(db_create, [DBLIBSRCS="$DBLIBSRCS db3.c"],
12 +  AC_CHECK_LIB(db-4.1, db_create, [DBLIBSRCS="$DBLIBSRCS db3.c"; libdb3="-ldb-4.1"],
13 -  AC_CHECK_LIB(db-3.2, db_create, [DBLIBSRCS="$DBLIBSRCS db3.c"; libdb3="-ldb-3.2"],
14 +  AC_CHECK_LIB(db-4.0, db_create, [DBLIBSRCS="$DBLIBSRCS db3.c"; libdb3="-ldb-4.0"],
15      AC_CHECK_LIB(db-3.1, db_create, [DBLIBSRCS="$DBLIBSRCS db3.c"; libdb3="-ldb-3.1"],
16        AC_CHECK_LIB(db-3.0, db_create, [DBLIBSRCS="$DBLIBSRCS db3.c"; libdb3="-ldb-3.0"],
17 @@ -449,6 +450,7 @@
18        )
19      )
20    )
21 +  )
22  )
23  
24  if test X"$DBLIBSRCS" = X; then
25 --- rpm-4.1/rpmdb/db3.c.orig    Tue Aug 13 20:42:39 2002
26 +++ rpm-4.1/rpmdb/db3.c Mon Aug 26 18:56:12 2002
27 @@ -366,7 +396,7 @@
28      if (db != NULL)
29         rc = db->sync(db, flags);
30      /* XXX DB_INCOMPLETE is returned occaisionally with multiple access. */
31 +    _printit = _debug;
32 -    _printit = (rc == DB_INCOMPLETE ? 0 : _debug);
33      rc = cvtdberr(dbi, "db->sync", rc, _printit);
34      return rc;
35  }
36 @@ -599,10 +633,11 @@
37  {
38      DB * db = dbi->dbi_db;
39      DB * secondary = dbisecondary->dbi_db;
40 +    DB_TXN * txnid = NULL;
41      int rc;
42  
43  /*@-moduncon@*/ /* FIX: annotate db3 methods */
44 +    rc = db->associate(db, txnid, secondary, callback, flags);
45 -    rc = db->associate(db, secondary, callback, flags);
46  /*@=moduncon@*/
47      rc = cvtdberr(dbi, "db->associate", rc, _debug);
48      return rc;
49 @@ -789,6 +830,7 @@
50  
51      DB * db = NULL;
52      DB_ENV * dbenv = NULL;
53 +    DB_TXN * txnid = NULL;
54      u_int32_t oflags;
55      int _printit;
56  
57 @@ -1124,8 +1180,8 @@
58                         ? dbfullpath : dbfile;
59  #endif
60  
61 +               rc = db->open(db, txnid, dbpath, dbsubfile,
62 +                   dbi->dbi_type, oflags, dbi->dbi_perms);
63 -               rc = db->open(db, dbpath, dbsubfile,
64 -                   dbi->dbi_type, oflags, dbi->dbi_perms);
65  
66                 if (rc == 0 && dbi->dbi_type == DB_UNKNOWN) {
67  #if (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR == 3 && DB_VERSION_PATCH == 11) \
68
69 --- /python/_rpmdb.c.orig       Thu Oct 17 20:19:03 2002
70 +++ /python/_rpmdb.c    Thu Oct 17 20:24:07 2002
71 @@ -410,25 +410,6 @@
72      switch (err) {
73          case 0:                     /* successful, no error */      break;
74  
75 -        case DB_INCOMPLETE:
76 -#if INCOMPLETE_IS_WARNING
77 -            strcpy(errTxt, db_strerror(err));
78 -            if (_db_errmsg[0]) {
79 -                strcat(errTxt, " -- ");
80 -                strcat(errTxt, _db_errmsg);
81 -                _db_errmsg[0] = 0;
82 -            }
83 -#if PYTHON_API_VERSION >= 1010 /* if Python 2.1 or better use warning framework */
84 -            exceptionRaised = PyErr_Warn(PyExc_RuntimeWarning, errTxt);
85 -#else
86 -            fprintf(stderr, errTxt);
87 -            fprintf(stderr, "\n");
88 -#endif
89 -
90 -#else  /* do an exception instead */
91 -        errObj = DBIncompleteError;
92 -#endif
93 -        break;
94  
95          case DB_KEYEMPTY:           errObj = DBKeyEmptyError;       break;
96          case DB_KEYEXIST:           errObj = DBKeyExistError;       break;
97 @@ -1025,7 +1006,7 @@
98  
99  
100      MYDB_BEGIN_ALLOW_THREADS;
101 -    err = self->db->associate(self->db,
102 +    err = self->db->associate(self->db, NULL,
103                                secondaryDB->db,
104                                _db_associateCallback,
105                                flags);
106 @@ -1498,7 +1479,7 @@
107      }
108  
109      MYDB_BEGIN_ALLOW_THREADS;
110 -    err = self->db->open(self->db, filename, dbname, type, flags, mode);
111 +    err = self->db->open(self->db, NULL, filename, dbname, type, flags, mode);
112      MYDB_END_ALLOW_THREADS;
113      if (makeDBError(err)) {
114          self->db = NULL;
115 @@ -1851,7 +1832,6 @@
116          MAKE_HASH_ENTRY(nkeys);
117          MAKE_HASH_ENTRY(ndata);
118          MAKE_HASH_ENTRY(pagesize);
119 -        MAKE_HASH_ENTRY(nelem);
120          MAKE_HASH_ENTRY(ffactor);
121          MAKE_HASH_ENTRY(buckets);
122          MAKE_HASH_ENTRY(free);
123 @@ -3337,7 +3317,6 @@
124  
125  #define MAKE_ENTRY(name)  _addIntToDict(d, #name, sp->st_##name)
126  
127 -    MAKE_ENTRY(lastid);
128      MAKE_ENTRY(nmodes);
129  #if (DBVER >= 32)
130      MAKE_ENTRY(maxlocks);
131 @@ -4116,7 +4095,6 @@
132      ADD_INT(d, DB_APPEND);
133      ADD_INT(d, DB_BEFORE);
134      ADD_INT(d, DB_CACHED_COUNTS);
135 -    ADD_INT(d, DB_CHECKPOINT);
136  #if (DBVER >= 33)
137      ADD_INT(d, DB_COMMIT);
138  #endif
139 @@ -4124,7 +4102,6 @@
140  #if (DBVER >= 32)
141      ADD_INT(d, DB_CONSUME_WAIT);
142  #endif
143 -    ADD_INT(d, DB_CURLSN);
144      ADD_INT(d, DB_CURRENT);
145  #if (DBVER >= 33)
146      ADD_INT(d, DB_FAST_STAT);
147 @@ -4164,7 +4141,6 @@
148      ADD_INT(d, DB_DONOTINDEX);
149  #endif
150  
151 -    ADD_INT(d, DB_INCOMPLETE);
152      ADD_INT(d, DB_KEYEMPTY);
153      ADD_INT(d, DB_KEYEXIST);
154      ADD_INT(d, DB_LOCK_DEADLOCK);
This page took 0.037208 seconds and 3 git commands to generate.