RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/rpmdb/ db3.c dbconfig.c rpmdb.c rpmdb.h

From: Alexey Tourbin <at@rpm5.org>
Date: Mon 18 Aug 2008 - 08:16:08 CEST
Message-Id: <20080818061608.5AE4270FB7@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Alexey Tourbin
  Root:   /v/rpm/cvs                       Email:  at@rpm5.org
  Module: rpm                              Date:   18-Aug-2008 08:16:08
  Branch: HEAD                             Handle: 2008081806160800

  Modified files:
    rpm/rpmdb               db3.c dbconfig.c rpmdb.c rpmdb.h

  Log:
    rpmdb: minor changes

  Summary:
    Revision    Changes     Path
    1.92        +4  -4      rpm/rpmdb/db3.c
    1.55        +1  -1      rpm/rpmdb/dbconfig.c
    1.263       +10 -11     rpm/rpmdb/rpmdb.c
    1.81        +1  -1      rpm/rpmdb/rpmdb.h
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/db3.c
  ============================================================================
  $ cvs diff -u -r1.91 -r1.92 db3.c
  --- rpm/rpmdb/db3.c	2 Aug 2008 16:36:10 -0000	1.91
  +++ rpm/rpmdb/db3.c	18 Aug 2008 06:16:08 -0000	1.92
  @@ -505,7 +505,7 @@
   	xx = dbenv->set_tx_max(dbenv, dbi->dbi_tx_max);
   	xx = cvtdberr(dbi, "dbenv->set_tx_max", xx, _debug);
       }
  -/* XXX dbenv->txn_checkpoint */        
  +/* XXX dbenv->txn_checkpoint */
   /* XXX dbenv->txn_recover */
   /* XXX dbenv->txn_stat */
    /* 4.1 dbenv->set_timeout(???) */
  @@ -839,7 +839,7 @@
       int rc = 0;
   
       if (db != NULL) {
  -#if (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR == 3 && DB_VERSION_PATCH == 11) \
  +#if (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR == 3 && DB_VERSION_PATCH >= 11) \
    || (DB_VERSION_MAJOR == 4)
   	int isswapped = 0;
   	rc = db->get_byteswapped(db, &isswapped);
  @@ -1062,7 +1062,7 @@
   			(dbhome ? dbhome : ""),
   			(dbfile ? dbfile : dbiBN));
   
  -	        /*
  +		/*
   		 * The DB handle may not be accessed again after
   		 * DB->verify is called, regardless of its return.
   		 */
  @@ -1564,7 +1564,7 @@
   #endif
   
   		if (rc == 0 && dbi_type == DB_UNKNOWN) {
  -#if (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR == 3 && DB_VERSION_PATCH == 11) \
  +#if (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR == 3 && DB_VERSION_PATCH >= 11) \
    || (DB_VERSION_MAJOR == 4)
   		    xx = db->get_type(db, &dbi_type);
   		    if (xx == 0)
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/dbconfig.c
  ============================================================================
  $ cvs diff -u -r1.54 -r1.55 dbconfig.c
  --- rpm/rpmdb/dbconfig.c	31 Jul 2008 16:58:56 -0000	1.54
  +++ rpm/rpmdb/dbconfig.c	18 Aug 2008 06:16:08 -0000	1.55
  @@ -176,7 +176,7 @@
   DB_DSYNC_DB
   DB_DSYNC_LOG
   DB_LOG_AUTOREMOVE
  -DB_LOG_BUFFER_FULL	???
  +DB_LOG_BUFFER_FULL	/* ??? */
   DB_LOG_INMEMORY
   DB_NOLOCKING
   DB_MULTIVERSION
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/rpmdb.c
  ============================================================================
  $ cvs diff -u -r1.262 -r1.263 rpmdb.c
  --- rpm/rpmdb/rpmdb.c	8 Aug 2008 03:19:31 -0000	1.262
  +++ rpm/rpmdb/rpmdb.c	18 Aug 2008 06:16:08 -0000	1.263
  @@ -1158,7 +1158,7 @@
   /*@=modfilesys@*/ /*@=nullpass@*/
   
       if (!oneshot) {
  -	_db_filter_dups = rpmExpandNumeric("%{_filterdbdups}");
  +	_db_filter_dups = rpmExpandNumeric("%{?_filterdbdups}");
   	oneshot = 1;
       }
   
  @@ -1177,7 +1177,7 @@
       db->db_root = rpmdbURIPath( (root && *root ? root : _DB_ROOT) );
       db->db_home = rpmdbURIPath( (home && *home ? home : _DB_HOME) );
   
  -    if (!(db->db_home && db->db_home[0])) {
  +    if (!(db->db_home && db->db_home[0] && db->db_home[0] != '%')) {
   	rpmlog(RPMLOG_ERR, _("no dbpath has been set\n"));
   	db->db_root = _free(db->db_root);
   	db->db_home = _free(db->db_home);
  @@ -1322,7 +1322,7 @@
   /* XXX python/rpmmodule.c */
   int rpmdbOpen (const char * prefix, rpmdb *dbp, int mode, int perms)
   {
  -    int _dbapi = rpmExpandNumeric("%{_dbapi}");
  +    int _dbapi = rpmExpandNumeric("%{?_dbapi}");
       return rpmdbOpenDatabase(prefix, NULL, _dbapi, dbp, mode, perms, 0);
   }
   
  @@ -2878,6 +2878,7 @@
   
   	if (db->db_tags != NULL)
   	for (dbix = 0; dbix < db->db_ndbi; dbix++) {
  +	    dbiIndex dbi;
   	    DBC * dbcursor = NULL;
   	    DBT k = DBT_INIT;
   	    DBT v = DBT_INIT;
  @@ -2887,7 +2888,6 @@
   	    rpmTag rpmtag = dbiTag->tag;
   	    const char * dbiBN = (dbiTag->str != NULL
   		? dbiTag->str : tagName(rpmtag));
  -	    dbiIndex dbi;
   	    rpmuint8_t * bin = NULL;
   	    int i;
   
  @@ -2939,7 +2939,6 @@
   		if (!xx)
   		    continue;
   		/*@switchbreak@*/ break;
  -
   	    }
   	
   	  dbi = dbiOpen(db, he->tag, 0);
  @@ -3065,7 +3064,7 @@
   
   if (k.size == 0) k.size = (UINT32_T) strlen((char *)k.data);
   if (k.size == 0) k.size++;	/* XXX "/" fixup. */
  - 
  +
   /*@-compmempass@*/
   		rc = dbiGet(dbi, dbcursor, &k, &v, DB_SET);
   		if (rc == 0) {			/* success */
  @@ -3269,9 +3268,9 @@
   	    DBT k = DBT_INIT;
   	    DBT v = DBT_INIT;
   
  -	    tagStore_t dbiTags = db->db_tags + dbix;
  -	    const char * dbiBN = (dbiTags->str != NULL
  -			? dbiTags->str : tagName(dbiTags->tag));
  +	    tagStore_t dbiTag = db->db_tags + dbix;
  +	    const char * dbiBN = (dbiTag->str != NULL
  +			? dbiTag->str : tagName(dbiTag->tag));
   	    rpmuint8_t * bin = NULL;
   	    rpmTagData requireFlags;
   	    rpmRC rpmrc;
  @@ -3280,7 +3279,7 @@
   	    rpmrc = RPMRC_NOTFOUND;
   	    requireFlags.ptr = NULL;
   	    dbi = NULL;
  -	    he->tag = dbiTags->tag;
  +	    he->tag = dbiTag->tag;
   	    he->t = 0;
   	    he->p.ptr = NULL;
   	    he->c = 0;
  @@ -4006,7 +4005,7 @@
   
       rpmlog(RPMLOG_DEBUG, D_("opening old database with dbapi %d\n"),
   		_dbapi);
  -    if (rpmdbOpenDatabase(myprefix, dbpath, _dbapi, &olddb, O_RDONLY, 0644, 
  +    if (rpmdbOpenDatabase(myprefix, dbpath, _dbapi, &olddb, O_RDONLY, 0644,
   		     RPMDB_FLAG_MINIMAL)) {
   	rc = 1;
   	goto exit;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/rpmdb.h
  ============================================================================
  $ cvs diff -u -r1.80 -r1.81 rpmdb.h
  --- rpm/rpmdb/rpmdb.h	7 Aug 2008 18:40:13 -0000	1.80
  +++ rpm/rpmdb/rpmdb.h	18 Aug 2008 06:16:08 -0000	1.81
  @@ -284,7 +284,7 @@
   
       int	dbi_ecflags;		/*!< db_env_create flags */
       int	dbi_cflags;		/*!< db_create flags */
  -    int	dbi_oeflags;		/*!< common (db,dbenv}->open flags */
  +    int	dbi_oeflags;		/*!< common (db,dbenv)->open flags */
       int	dbi_eflags;		/*!< dbenv->open flags */
       int	dbi_oflags;		/*!< db->open flags */
       int	dbi_tflags;		/*!< dbenv->txn_begin flags */
  @@ .
Received on Mon Aug 18 08:16:08 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.