diff -Nur rpm-4.1.orig/configure.ac rpm-4.1/configure.ac --- rpm-4.1.orig/configure.ac Sun Oct 20 16:34:30 2002 +++ rpm-4.1/configure.ac Sun Oct 20 16:37:39 2002 @@ -437,10 +437,12 @@ if test $withval = no ; then dnl ------------------ without internal db -AC_CHECK_HEADERS(db3/db.h) +AC_CHECK_HEADERS(db.h) dnl Check for Berkeley db3 API. AC_CHECK_FUNC(db_create, [DBLIBSRCS="$DBLIBSRCS db3.c"], + AC_CHECK_LIB(db-4.1, db_create, [DBLIBSRCS="$DBLIBSRCS db3.c"; libdb3="-ldb-4.1"], + AC_CHECK_LIB(db-4.0, db_create, [DBLIBSRCS="$DBLIBSRCS db3.c"; libdb3="-ldb-4.0"], AC_CHECK_LIB(db-3.2, db_create, [DBLIBSRCS="$DBLIBSRCS db3.c"; libdb3="-ldb-3.2"], AC_CHECK_LIB(db-3.1, db_create, [DBLIBSRCS="$DBLIBSRCS db3.c"; libdb3="-ldb-3.1"], AC_CHECK_LIB(db-3.0, db_create, [DBLIBSRCS="$DBLIBSRCS db3.c"; libdb3="-ldb-3.0"], @@ -449,6 +451,8 @@ ) ) ) + ) + ) ) if test X"$DBLIBSRCS" = X; then diff -Nur rpm-4.1.orig/python/_rpmdb.c rpm-4.1/python/_rpmdb.c --- rpm-4.1.orig/python/_rpmdb.c Fri Jun 7 15:12:34 2002 +++ rpm-4.1/python/_rpmdb.c Sun Oct 20 16:36:39 2002 @@ -410,25 +410,6 @@ switch (err) { case 0: /* successful, no error */ break; - case DB_INCOMPLETE: -#if INCOMPLETE_IS_WARNING - strcpy(errTxt, db_strerror(err)); - if (_db_errmsg[0]) { - strcat(errTxt, " -- "); - strcat(errTxt, _db_errmsg); - _db_errmsg[0] = 0; - } -#if PYTHON_API_VERSION >= 1010 /* if Python 2.1 or better use warning framework */ - exceptionRaised = PyErr_Warn(PyExc_RuntimeWarning, errTxt); -#else - fprintf(stderr, errTxt); - fprintf(stderr, "\n"); -#endif - -#else /* do an exception instead */ - errObj = DBIncompleteError; -#endif - break; case DB_KEYEMPTY: errObj = DBKeyEmptyError; break; case DB_KEYEXIST: errObj = DBKeyExistError; break; @@ -1025,7 +1006,7 @@ MYDB_BEGIN_ALLOW_THREADS; - err = self->db->associate(self->db, + err = self->db->associate(self->db, NULL, secondaryDB->db, _db_associateCallback, flags); @@ -1498,7 +1479,7 @@ } MYDB_BEGIN_ALLOW_THREADS; - err = self->db->open(self->db, filename, dbname, type, flags, mode); + err = self->db->open(self->db, NULL, filename, dbname, type, flags, mode); MYDB_END_ALLOW_THREADS; if (makeDBError(err)) { self->db = NULL; @@ -1851,7 +1832,6 @@ MAKE_HASH_ENTRY(nkeys); MAKE_HASH_ENTRY(ndata); MAKE_HASH_ENTRY(pagesize); - MAKE_HASH_ENTRY(nelem); MAKE_HASH_ENTRY(ffactor); MAKE_HASH_ENTRY(buckets); MAKE_HASH_ENTRY(free); @@ -3337,7 +3317,6 @@ #define MAKE_ENTRY(name) _addIntToDict(d, #name, sp->st_##name) - MAKE_ENTRY(lastid); MAKE_ENTRY(nmodes); #if (DBVER >= 32) MAKE_ENTRY(maxlocks); @@ -4116,7 +4095,6 @@ ADD_INT(d, DB_APPEND); ADD_INT(d, DB_BEFORE); ADD_INT(d, DB_CACHED_COUNTS); - ADD_INT(d, DB_CHECKPOINT); #if (DBVER >= 33) ADD_INT(d, DB_COMMIT); #endif @@ -4124,7 +4102,6 @@ #if (DBVER >= 32) ADD_INT(d, DB_CONSUME_WAIT); #endif - ADD_INT(d, DB_CURLSN); ADD_INT(d, DB_CURRENT); #if (DBVER >= 33) ADD_INT(d, DB_FAST_STAT); @@ -4164,7 +4141,6 @@ ADD_INT(d, DB_DONOTINDEX); #endif - ADD_INT(d, DB_INCOMPLETE); ADD_INT(d, DB_KEYEMPTY); ADD_INT(d, DB_KEYEXIST); ADD_INT(d, DB_LOCK_DEADLOCK); diff -Nur rpm-4.1.orig/rpmdb/db3.c rpm-4.1/rpmdb/db3.c --- rpm-4.1.orig/rpmdb/db3.c Tue Aug 13 22:42:39 2002 +++ rpm-4.1/rpmdb/db3.c Sun Oct 20 16:36:39 2002 @@ -366,7 +366,7 @@ if (db != NULL) rc = db->sync(db, flags); /* XXX DB_INCOMPLETE is returned occaisionally with multiple access. */ - _printit = (rc == DB_INCOMPLETE ? 0 : _debug); + _printit = _debug; rc = cvtdberr(dbi, "db->sync", rc, _printit); return rc; } @@ -599,10 +599,11 @@ { DB * db = dbi->dbi_db; DB * secondary = dbisecondary->dbi_db; + DB_TXN * txnid = NULL; int rc; /*@-moduncon@*/ /* FIX: annotate db3 methods */ - rc = db->associate(db, secondary, callback, flags); + rc = db->associate(db, txnid, secondary, callback, flags); /*@=moduncon@*/ rc = cvtdberr(dbi, "db->associate", rc, _debug); return rc; @@ -789,6 +790,7 @@ DB * db = NULL; DB_ENV * dbenv = NULL; + DB_TXN * txnid = NULL; u_int32_t oflags; int _printit; @@ -1124,7 +1126,7 @@ ? dbfullpath : dbfile; #endif - rc = db->open(db, dbpath, dbsubfile, + rc = db->open(db, txnid, dbpath, dbsubfile, dbi->dbi_type, oflags, dbi->dbi_perms); if (rc == 0 && dbi->dbi_type == DB_UNKNOWN) {