Re: [Tracker] [PATCHES] tracker-0.5.3 removal of mysql code & sqlite cleanups



2007/1/10, Saleem Abdulrasool <compnerd gentoo org>:
Hi.

Attached are two patches to cleanup some of the code from previous
releases.  The first one removes most of the last traces of mysql
things.  In addition to the patch, there are 3 files which should be
removed data/mysql-*.sql .

I can't really comment on this issue, if mysql support should be
removed or not. This is surely something jamie has to decide.
But if the mysql support is removed, you probably should also delete
src/trackerd/tracker-db-mysql.{c,h} (from SVN).

The second patch is for the sqlite setup.  Since sqlite is the only
database backend in use, it drops the use of USING_SQLITE.  It further
more, pulls in the header from the system if an external sqlite is
selected.

No real comment on the first point about dropping USING_SQLITE,
because it depends on the above question. But you are definitely right
about the second point, that if --enable-external-sqlite is used, the
sqlite3.h header should be included from the system. This should
really be fixed.
I have a much cleaner solution for this though, please see the
attached patch. It basically does the following:
configure.in:
If $enable_external_sqlite is no, it sets the
       SQLITE3_CFLAGS="-I\$(top_srcdir)/src/sqlite3"
       SQLITE3_LIBS="\$(top_builddir)/src/sqlite3/libsqlite-private.la"

In src/trackerd/Makefile.am we can then drop the

if USING_EXTERNAL_SQLITE
additional_flags= $(SQLITE3_CFLAGS)
additional_libs= $(SQLITE3_LIBS)
else
additional_flags= -I$(top_builddir)/src/sqlite3
additional_libs= $(top_builddir)/src/sqlite3/libsqlite-private.la
endif

completely and simply use SQLITE3_CFLAGS and SQLITE_LIBS, because they
are already set correctly.

src/trackerd/tracker-db-sqlite.h then is changed to use
#include <sqlite3.h> instead of #include "../sqlite3/sqlite3.h". And
so picks up the correct sqlite3.h automatically.

Besides this, I also updated the package url in configure.in, replaced
the obsoleted AM_PROG_LIBTOOL and with AM_CONFIG_HEADER with the now
recommended AC_PROG_LIBTOOL and AC_CONFIG_HEADERS.

I also removed the useless "-g" flag from INCLUDES and
-I$(top_builddir)/src/libstemmer. This is also not needed, because
tracker-utils.h uses
#include "../libstemmer/include/libstemmer.h"
If you wanted to use #include <libstemmer.h> in tracker-utils.h the
correct include path would be  -I$(top_srcddir)/src/libstemmer anyhow,
as the header file is in the source and not the build dir.

Please comment and apply,
Michael

Attachment: tracker_sqlite_build_improvements.patch
Description: Text Data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]