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: 21-Sep-2010 18:15:14 Branch: rpm-5_3 Handle: 2010092116151200 Modified files: (Branch: rpm-5_3) rpm/rpmdb db3.c Log: - db3: handle DB_RPCCLIENT directly, don't fuss DB_CLIENT 4.2.52 retrofit. Summary: Revision Changes Path 1.150.2.3 +14 -11 rpm/rpmdb/db3.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/rpmdb/db3.c ============================================================================ $ cvs diff -u -r1.150.2.2 -r1.150.2.3 db3.c --- rpm/rpmdb/db3.c 30 Apr 2010 15:08:59 -0000 1.150.2.2 +++ rpm/rpmdb/db3.c 21 Sep 2010 16:15:12 -0000 1.150.2.3 @@ -32,10 +32,6 @@ extern int logio_dispatch(DB_ENV * dbenv, DBT * dbt, DB_LSN * lsn, db_recops op) /*...@*/; -#if !defined(DB_CLIENT) /* XXX db-4.2.42 retrofit */ -#define DB_CLIENT DB_RPCCLIENT -#endif - #define DBIDEBUG(_dbi, _list) if ((_dbi)->dbi_debug) fprintf _list /*...@access rpmdb @*/ @@ -507,10 +503,10 @@ int rc = error; if (printit && rc) { - /*...@-moduncon@*/ /* FIX: annotate db3 methods */ +/*...@-moduncon@*/ /* FIX: annotate db3 methods */ rpmlog(RPMLOG_ERR, "%s:%s:%u: %s(%d): %s\n", func, fn, ln, msg, rc, db_strerror(error)); - /*...@=moduncon@*/ +/*...@=moduncon@*/ } return rc; @@ -780,8 +776,10 @@ dbhome, dbfile, prDbiOpenFlags(eflags, 1)); /* XXX Can't do RPC w/o host. */ +#if defined(DB_RPCCLIENT) if (dbi->dbi_host == NULL) - dbi->dbi_ecflags &= ~DB_CLIENT; + dbi->dbi_ecflags &= ~DB_RPCCLIENT; +#endif rc = db_env_create(&dbenv, dbi->dbi_ecflags); rc = cvtdberr(dbi, "db_env_create", rc, _debug); @@ -809,7 +807,8 @@ /* dbenv->set_paniccall(???) */ - if ((dbi->dbi_ecflags & DB_CLIENT) && dbi->dbi_host) { +#if defined(DB_RPCCLIENT) + if ((dbi->dbi_ecflags & DB_RPCCLIENT) && dbi->dbi_host) { const char * home; int retry = 0; @@ -825,7 +824,9 @@ break; (void) sleep(15); } - } else { + } else +#endif + { { size_t _lo = 16 * 1024 * 1024; size_t _hi = 512 * 1024 * 1024; @@ -1720,7 +1721,7 @@ h = headerLoad(data->data); if (h == NULL) { rpmlog(RPMLOG_ERR, - _("rpmdb: header #%u cannot be loaded -- skipping.\n"), + _("db3: header #%u cannot be loaded -- skipping.\n"), (unsigned)hdrNum); goto exit; } @@ -2475,7 +2476,9 @@ * glibc/kernel combinations. */ if (rc == 0 && dbi->dbi_lockdbfd && - !((dbi->dbi_ecflags & DB_CLIENT) && dbi->dbi_host) && +#if defined(DB_RPCCLIENT) + !((dbi->dbi_ecflags & DB_RPCCLIENT) && dbi->dbi_host) && +#endif (!dbi->dbi_use_dbenv || _lockdbfd++ == 0)) { int fdno = -1; @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org