tracker r1530 - in branches/indexer-split: . src/libtracker-common src/libtracker-db src/tracker-indexer src/tracker-indexer/modules src/trackerd
- From: mr svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r1530 - in branches/indexer-split: . src/libtracker-common src/libtracker-db src/tracker-indexer src/tracker-indexer/modules src/trackerd
- Date: Thu, 29 May 2008 13:04:50 +0000 (UTC)
Author: mr
Date: Thu May 29 13:04:50 2008
New Revision: 1530
URL: http://svn.gnome.org/viewvc/tracker?rev=1530&view=rev
Log:
* src/libtracker-common/Makefile.am: Don't include the HAL files
twice, this was causing some serious headaches today.
* src/libtracker-common/tracker-hal.h: Put the HAVE_HAL check
after the already included check.
* src/libtracker-db/Makefile.am: Make sure we depend on
libtracker-common because we need some of the dbus API calls
there.
* src/tracker-indexer/modules/Makefile.am: Remove commented out
libtracker-common include. Not needed.
* src/tracker-indexer/tracker-dbus.c:
* src/tracker-indexer/tracker-main.c:
* src/trackerd/tracker-dbus.c:
* src/trackerd/tracker-indexer.c:
* src/trackerd/tracker-main.c: Some logging/debugging updates. Now
we say where the log file is and print it to the terminal so users
know where to look. Also state when we are done loading so the
user knows we aren't hanging for some startup processes.
Modified:
branches/indexer-split/ChangeLog
branches/indexer-split/src/libtracker-common/Makefile.am
branches/indexer-split/src/libtracker-common/tracker-hal.c
branches/indexer-split/src/libtracker-common/tracker-hal.h
branches/indexer-split/src/libtracker-db/Makefile.am
branches/indexer-split/src/tracker-indexer/modules/Makefile.am
branches/indexer-split/src/tracker-indexer/tracker-dbus.c
branches/indexer-split/src/tracker-indexer/tracker-main.c
branches/indexer-split/src/trackerd/tracker-dbus.c
branches/indexer-split/src/trackerd/tracker-indexer.c
branches/indexer-split/src/trackerd/tracker-main.c
Modified: branches/indexer-split/src/libtracker-common/Makefile.am
==============================================================================
--- branches/indexer-split/src/libtracker-common/Makefile.am (original)
+++ branches/indexer-split/src/libtracker-common/Makefile.am Thu May 29 13:04:50 2008
@@ -17,7 +17,7 @@
if HAVE_HAL
hal_sources = \
- tracker-hal.c \
+ tracker-hal.c \
tracker-hal.h
endif
@@ -36,8 +36,6 @@
tracker-field-data.h \
tracker-file-utils.c \
tracker-file-utils.h \
- tracker-hal.c \
- tracker-hal.h \
tracker-language.c \
tracker-language.h \
tracker-log.c \
Modified: branches/indexer-split/src/libtracker-common/tracker-hal.c
==============================================================================
--- branches/indexer-split/src/libtracker-common/tracker-hal.c (original)
+++ branches/indexer-split/src/libtracker-common/tracker-hal.c Thu May 29 13:04:50 2008
@@ -67,6 +67,7 @@
GParamSpec *pspec);
static gboolean hal_setup_devices (TrackerHal *hal);
static gboolean hal_setup_batteries (TrackerHal *hal);
+
static gboolean hal_device_add (TrackerHal *hal,
LibHalVolume *volume);
static void hal_device_added_cb (LibHalContext *context,
Modified: branches/indexer-split/src/libtracker-common/tracker-hal.h
==============================================================================
--- branches/indexer-split/src/libtracker-common/tracker-hal.h (original)
+++ branches/indexer-split/src/libtracker-common/tracker-hal.h Thu May 29 13:04:50 2008
@@ -19,11 +19,11 @@
* Boston, MA 02110-1301, USA.
*/
-#ifdef HAVE_HAL
-
#ifndef __LIBTRACKER_HAL_H__
#define __LIBTRACKER_HAL_H__
+#ifdef HAVE_HAL
+
#include <glib-object.h>
G_BEGIN_DECLS
@@ -56,6 +56,6 @@
G_END_DECLS
-#endif /* __LIBTRACKER_HAL_H__ */
-
#endif /* HAVE_HAL */
+
+#endif /* __LIBTRACKER_HAL_H__ */
Modified: branches/indexer-split/src/libtracker-db/Makefile.am
==============================================================================
--- branches/indexer-split/src/libtracker-db/Makefile.am (original)
+++ branches/indexer-split/src/libtracker-db/Makefile.am Thu May 29 13:04:50 2008
@@ -26,6 +26,7 @@
libtracker_db_la_LDFLAGS = -version-info 0:0:0
libtracker_db_la_LIBADD = \
+ $(top_builddir)/src/libtracker-common/libtracker-common.la \
$(SQLITE3_LIBS) \
$(QDBM_LIBS) \
$(DBUS_LIBS) \
Modified: branches/indexer-split/src/tracker-indexer/modules/Makefile.am
==============================================================================
--- branches/indexer-split/src/tracker-indexer/modules/Makefile.am (original)
+++ branches/indexer-split/src/tracker-indexer/modules/Makefile.am Thu May 29 13:04:50 2008
@@ -22,8 +22,6 @@
$(GMODULE_LIBS) \
$(GLIB2_LIBS)
-# $(top_builddir)/src/libtracker-common/libtracker-common.la
-
# Files module
libtracker_indexer_files_la_SOURCES = files.c
libtracker_indexer_files_la_LDFLAGS = $(module_flags)
Modified: branches/indexer-split/src/tracker-indexer/tracker-dbus.c
==============================================================================
--- branches/indexer-split/src/tracker-indexer/tracker-dbus.c (original)
+++ branches/indexer-split/src/tracker-indexer/tracker-dbus.c Thu May 29 13:04:50 2008
@@ -38,14 +38,14 @@
guint result;
g_message ("Registering DBus service...\n"
- " Name '%s'",
+ " Name:'%s'",
name);
if (!org_freedesktop_DBus_request_name (proxy,
name,
DBUS_NAME_FLAG_DO_NOT_QUEUE,
&result, &error)) {
- g_critical ("Could not aquire name: %s, %s",
+ g_critical ("Could not aquire name:'%s', %s",
name,
error ? error->message : "no error given");
g_error_free (error);
@@ -54,7 +54,7 @@
}
if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
- g_critical ("DBus service name '%s' is already taken, "
+ g_critical ("DBus service name:'%s' is already taken, "
"perhaps the application is already running?",
name);
return FALSE;
@@ -71,8 +71,8 @@
const gchar *path)
{
g_message ("Registering DBus object...");
- g_message (" Path '%s'", path);
- g_message (" Object Type '%s'", G_OBJECT_TYPE_NAME (object));
+ g_message (" Path:'%s'", path);
+ g_message (" Object Type:'%s'", G_OBJECT_TYPE_NAME (object));
dbus_g_object_type_install_info (G_OBJECT_TYPE (object), info);
dbus_g_connection_register_g_object (connection, path, object);
Modified: branches/indexer-split/src/tracker-indexer/tracker-main.c
==============================================================================
--- branches/indexer-split/src/tracker-indexer/tracker-main.c (original)
+++ branches/indexer-split/src/tracker-indexer/tracker-main.c Thu May 29 13:04:50 2008
@@ -149,8 +149,6 @@
{
gchar *data_dir, *user_data_dir, *sys_tmp_dir, *filename;
- g_message ("Initializing...\n");
-
tracker_ontology_init ();
data_dir = g_build_filename (g_get_user_cache_dir (),
@@ -191,7 +189,7 @@
GError *error = NULL;
gchar *summary = NULL;
gchar *example;
- gchar *log_filename;
+ gchar *filename;
g_type_init ();
@@ -248,14 +246,14 @@
tracker_config_set_verbosity (config, verbosity);
}
- log_filename = g_build_filename (g_get_user_data_dir (),
- "tracker",
- "tracker-indexer.log",
- NULL);
-
- tracker_log_init (log_filename, tracker_config_get_verbosity (config));
- g_message ("Starting log");
- g_free (log_filename);
+ filename = g_build_filename (g_get_user_data_dir (),
+ "tracker",
+ "tracker-indexer.log",
+ NULL);
+
+ tracker_log_init (filename, tracker_config_get_verbosity (config));
+ g_print ("Starting log:\n File:'%s'\n", filename);
+ g_free (filename);
/* Make sure we initialize DBus, this shows we are started
* successfully when called upon from the daemon.
@@ -296,6 +294,8 @@
g_signal_connect (indexer, "finished",
G_CALLBACK (indexer_finished_cb), NULL);
+ g_message ("Starting...");
+
main_loop = g_main_loop_new (NULL, FALSE);
g_main_loop_run (main_loop);
Modified: branches/indexer-split/src/trackerd/tracker-dbus.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-dbus.c (original)
+++ branches/indexer-split/src/trackerd/tracker-dbus.c Thu May 29 13:04:50 2008
@@ -56,14 +56,14 @@
guint result;
g_message ("Registering DBus service...\n"
- " Name '%s'",
+ " Name:'%s'",
name);
if (!org_freedesktop_DBus_request_name (proxy,
name,
DBUS_NAME_FLAG_DO_NOT_QUEUE,
&result, &error)) {
- g_critical ("Could not aquire name: %s, %s",
+ g_critical ("Could not aquire name:'%s', %s",
name,
error ? error->message : "no error given");
g_error_free (error);
@@ -72,7 +72,7 @@
}
if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
- g_critical ("DBus service name '%s' is already taken, "
+ g_critical ("DBus service name:'%s' is already taken, "
"perhaps the daemon is already running?",
name);
return FALSE;
@@ -91,8 +91,8 @@
GObject *object;
g_message ("Registering DBus object...");
- g_message (" Path '%s'", path);
- g_message (" Type '%s'", g_type_name (object_type));
+ g_message (" Path:'%s'", path);
+ g_message (" Type:'%s'", g_type_name (object_type));
object = g_object_new (object_type, NULL);
Modified: branches/indexer-split/src/trackerd/tracker-indexer.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-indexer.c (original)
+++ branches/indexer-split/src/trackerd/tracker-indexer.c Thu May 29 13:04:50 2008
@@ -17,23 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
-/* Needed before including math.h for lrintf() */
-#define _ISOC9X_SOURCE 1
-#define _ISOC99_SOURCE 1
-
-#define __USE_ISOC9X 1
-#define __USE_ISOC99 1
-
-/* Size of free block pool of inverted index */
-#define INDEXFBP 32
-#define SCORE_MULTIPLIER 100000
-#define MAX_HIT_BUFFER 480000
-#define MAX_HITS_FOR_WORD 30000
-#define MAX_INDEX_FILE_SIZE 2000000000
-
-#define CREATE_INDEX \
- "CREATE TABLE HitIndex (Word Text not null " \
- "unique, HitCount Integer, HitArraySize Integer, HitArray Blob);"
+#include "config.h"
#include <stdlib.h>
#include <stdio.h>
@@ -41,6 +25,14 @@
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
+
+/* Needed before including math.h for lrintf() */
+#define _ISOC9X_SOURCE 1
+#define _ISOC99_SOURCE 1
+
+#define __USE_ISOC9X 1
+#define __USE_ISOC99 1
+
#include <math.h>
#include <depot.h>
@@ -66,6 +58,17 @@
#include "tracker-main.h"
#include "tracker-status.h"
+/* Size of free block pool of inverted index */
+#define INDEXFBP 32
+#define SCORE_MULTIPLIER 100000
+#define MAX_HIT_BUFFER 480000
+#define MAX_HITS_FOR_WORD 30000
+#define MAX_INDEX_FILE_SIZE 2000000000
+
+#define CREATE_INDEX \
+ "CREATE TABLE HitIndex (Word Text not null " \
+ "unique, HitCount Integer, HitArraySize Integer, HitArray Blob);"
+
extern Tracker *tracker;
struct Indexer_ {
@@ -408,7 +411,7 @@
if (tracker_hal_get_battery_exists (tracker->hal)) {
interval /= 2;
}
-#endif
+#endif /* HAVE_HAL */
dpiterinit (src->word_index);
@@ -772,7 +775,7 @@
if (tracker_hal_get_battery_exists (tracker->hal)) {
interval /= 2;
}
-#endif
+#endif /* HAVE_HAL */
}
}
Modified: branches/indexer-split/src/trackerd/tracker-main.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-main.c (original)
+++ branches/indexer-split/src/trackerd/tracker-main.c Thu May 29 13:04:50 2008
@@ -931,7 +931,7 @@
/* Initialise other subsystems */
tracker_log_init (log_filename, tracker_config_get_verbosity (tracker->config));
- g_message ("Starting log");
+ g_print ("Starting log:\n File:'%s'\n", log_filename);
if (!tracker_dbus_init (tracker->config)) {
return EXIT_FAILURE;
@@ -947,8 +947,8 @@
tracker_ontology_init ();
tracker_email_init (tracker->config);
-#ifdef HAVE_HAL
- tracker->hal = tracker_hal_new ();
+#ifdef HAVE_HAL
+ tracker->hal = tracker_hal_new ();
#endif /* HAVE_HAL */
initialise_directories (&need_index);
@@ -984,7 +984,8 @@
gint initial_sleep;
initial_sleep = tracker_config_get_initial_sleep (tracker->config);
- g_message ("Sleeping for:%d secs before starting...", initial_sleep);
+ g_message ("Indexing enabled, sleeping for %d secs before starting...",
+ initial_sleep);
while (initial_sleep > 0) {
g_usleep (G_USEC_PER_SEC);
@@ -997,7 +998,7 @@
}
if (tracker->is_running && !tracker->shutdown) {
- g_message ("Starting indexer...");
+ g_message ("Indexing enabled, starting...");
tracker_dbus_start_indexer ();
}
@@ -1011,9 +1012,11 @@
NULL);
#endif
} else {
- g_message ("Indexing disabled, waiting for DBus requests...");
+ g_message ("Indexing disabled, not starting");
}
}
+
+ g_message ("Waiting for DBus requests...");
if (tracker->is_running) {
main_loop = g_main_loop_new (NULL, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]