RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/rpmdb/ sqlite.c

From: Jeff Johnson <jbj@rpm5.org>
Date: Sun 22 Jul 2007 - 20:27:50 CEST
Message-Id: <20070722182750.A6A823484F4@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  jbj@rpm5.org
  Module: rpm                              Date:   22-Jul-2007 20:27:50
  Branch: HEAD                             Handle: 2007072219275000

  Modified files:
    rpm/rpmdb               sqlite.c

  Log:
    proof-of-concept code iff sqlite and BDB have same semantic.

  Summary:
    Revision    Changes     Path
    1.10        +11 -0      rpm/rpmdb/sqlite.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/sqlite.c
  ============================================================================
  $ cvs diff -u -r1.9 -r1.10 sqlite.c
  --- rpm/rpmdb/sqlite.c	16 Jul 2007 01:32:32 -0000	1.9
  +++ rpm/rpmdb/sqlite.c	22 Jul 2007 18:27:50 -0000	1.10
  @@ -861,6 +861,17 @@
   	rpmMessage(RPMMESS_DEBUG, _("closed   sql db         %s\n"),
   		dbi->dbi_subfile);
   
  +#if defined(MAYBE) /* XXX should sqlite and BDB have different semantics? *?
  +	if (dbi->dbi_temporary && !(dbi->dbi_eflags & DB_PRIVATE)) {
  +	    const char * dbhome = NULL;
  +	    urltype ut = urlPath(dbi->dbi_home, &dbhome);
  +	    const char * dbfname = rpmGenPath(dbhome, dbi->dbi_file, NULL);
  +	    int xx = (dbfname ? Unlink(dbfname) : 0);
  +	    ut = ut; xx = xx;	/* XXX tell gcc to be quiet. */
  +	    dbfname = _free(dbfname);
  +	}
  +#endif
  +
   	dbi->dbi_stats = _free(dbi->dbi_stats);
   	dbi->dbi_file = _free(dbi->dbi_file);
   	dbi->dbi_db = _free(dbi->dbi_db);
  @@ .
Received on Sun Jul 22 20:27:50 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.