tracker r1678 - in branches/xesam-support: . src/libtracker-common src/trackerd tests/libtracker-common tests/trackerd
- From: pvanhoof svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r1678 - in branches/xesam-support: . src/libtracker-common src/trackerd tests/libtracker-common tests/trackerd
- Date: Fri, 13 Jun 2008 14:31:04 +0000 (UTC)
Author: pvanhoof
Date: Fri Jun 13 14:31:04 2008
New Revision: 1678
URL: http://svn.gnome.org/viewvc/tracker?rev=1678&view=rev
Log:
2008-06-13 Philip Van Hoof <pvanhoof gnome org>
* svn merge -r 1672:1677 ../indexer-split
* src/trackerd/tracker-crawler.c: No more blocking of the mainloop
Added:
branches/xesam-support/tests/libtracker-common/non-utf8.txt
- copied unchanged from r1677, /branches/indexer-split/tests/libtracker-common/non-utf8.txt
branches/xesam-support/tests/libtracker-common/tracker-dbus-test.c
- copied unchanged from r1677, /branches/indexer-split/tests/libtracker-common/tracker-dbus-test.c
Modified:
branches/xesam-support/ChangeLog
branches/xesam-support/src/libtracker-common/tracker-dbus.c
branches/xesam-support/src/libtracker-common/tracker-file-utils.c
branches/xesam-support/src/libtracker-common/tracker-file-utils.h
branches/xesam-support/src/trackerd/tracker-crawler.c
branches/xesam-support/src/trackerd/tracker-db.c
branches/xesam-support/src/trackerd/tracker-email-kmail.c
branches/xesam-support/src/trackerd/tracker-monitor.c
branches/xesam-support/src/trackerd/tracker-monitor.h
branches/xesam-support/src/trackerd/tracker-process-files.c
branches/xesam-support/tests/libtracker-common/Makefile.am
branches/xesam-support/tests/trackerd/tracker-xesam-session-test.c
Modified: branches/xesam-support/src/libtracker-common/tracker-dbus.c
==============================================================================
--- branches/xesam-support/src/libtracker-common/tracker-dbus.c (original)
+++ branches/xesam-support/src/libtracker-common/tracker-dbus.c Fri Jun 13 14:31:04 2008
@@ -72,7 +72,7 @@
for (l = list; l != NULL; l = l->next) {
if (!g_utf8_validate (l->data, -1, NULL)) {
- g_warning ("Could not add string:'%s' to GStrv, invalid UTF-8",
+ g_message ("Could not add string:'%s' to GStrv, invalid UTF-8",
(gchar*) l->data);
continue;
}
@@ -113,7 +113,7 @@
if (str) {
if (!g_utf8_validate (str, -1, NULL)) {
- g_warning ("Could not add string:'%s' to GStrv, invalid UTF-8", str);
+ g_message ("Could not add string:'%s' to GStrv, invalid UTF-8", str);
g_free (str);
continue;
}
Modified: branches/xesam-support/src/libtracker-common/tracker-file-utils.c
==============================================================================
--- branches/xesam-support/src/libtracker-common/tracker-file-utils.c (original)
+++ branches/xesam-support/src/libtracker-common/tracker-file-utils.c Fri Jun 13 14:31:04 2008
@@ -467,3 +467,72 @@
g_slist_foreach (dirs_to_remove, (GFunc) g_free, NULL);
g_slist_free (dirs_to_remove);
}
+
+GSList *
+tracker_path_list_filter_duplicates (GSList *roots)
+{
+ GSList *checked_roots = NULL;
+ GSList *l1, *l2;
+
+ /* ONLY HERE do we add separators on each location we check.
+ * The reason for this is that these locations are user
+ * entered in the configuration and we need to make sure we
+ * don't include the same location more than once.
+ */
+
+ for (l1 = roots; l1; l1 = l1->next) {
+ gchar *path;
+ gboolean should_add = TRUE;
+
+ if (!g_str_has_suffix (l1->data, G_DIR_SEPARATOR_S)) {
+ path = g_strconcat (l1->data, G_DIR_SEPARATOR_S, NULL);
+ } else {
+ path = g_strdup (l1->data);
+ }
+
+ l2 = checked_roots;
+
+ while (l2 && should_add) {
+ /* If the new path exists as a lower level
+ * path or is the same as an existing checked
+ * root we disgard it, it will be checked
+ * anyway.
+ */
+ if (g_str_has_prefix (path, l2->data)) {
+ should_add = FALSE;
+ }
+
+ /* If the new path exists as a higher level
+ * path to one already in the checked roots,
+ * we remove the checked roots version
+ */
+ if (g_str_has_prefix (l2->data, path)) {
+ checked_roots = g_slist_remove_link (checked_roots, l2);
+ g_free (l2->data);
+ l2 = checked_roots;
+ continue;
+ }
+
+ l2 = l2->next;
+ }
+
+ if (should_add) {
+ checked_roots = g_slist_prepend (checked_roots, path);
+ continue;
+ }
+
+ g_free (path);
+ }
+
+ checked_roots = g_slist_reverse (checked_roots);
+
+#ifdef TESTING
+ g_debug ("Using the following roots to crawl:");
+
+ for (l1 = checked_roots; l1; l1 = l1->next) {
+ g_debug (" %s", (gchar*) l1->data);
+ }
+#endif /* TESTING */
+
+ return checked_roots;
+}
Modified: branches/xesam-support/src/libtracker-common/tracker-file-utils.h
==============================================================================
--- branches/xesam-support/src/libtracker-common/tracker-file-utils.h (original)
+++ branches/xesam-support/src/libtracker-common/tracker-file-utils.h Fri Jun 13 14:31:04 2008
@@ -24,20 +24,20 @@
#include <glib.h>
-gint tracker_file_open (const gchar *uri,
- gboolean readahead);
-void tracker_file_close (gint fd,
- gboolean no_longer_needed);
-gboolean tracker_file_unlink (const gchar *uri);
-gboolean tracker_file_is_valid (const gchar *uri);
-gboolean tracker_file_is_directory (const gchar *uri);
-gboolean tracker_file_is_indexable (const gchar *uri);
-guint32 tracker_file_get_size (const gchar *uri);
-gint32 tracker_file_get_mtime (const gchar *uri);
-gchar * tracker_file_get_mime_type (const gchar *uri);
-gchar * tracker_file_get_vfs_path (const gchar *uri);
-gchar * tracker_file_get_vfs_name (const gchar *uri);
-
-void tracker_path_remove (const gchar *uri);
+gint tracker_file_open (const gchar *uri,
+ gboolean readahead);
+void tracker_file_close (gint fd,
+ gboolean no_longer_needed);
+gboolean tracker_file_unlink (const gchar *uri);
+gboolean tracker_file_is_valid (const gchar *uri);
+gboolean tracker_file_is_directory (const gchar *uri);
+gboolean tracker_file_is_indexable (const gchar *uri);
+guint32 tracker_file_get_size (const gchar *uri);
+gint32 tracker_file_get_mtime (const gchar *uri);
+gchar * tracker_file_get_mime_type (const gchar *uri);
+gchar * tracker_file_get_vfs_path (const gchar *uri);
+gchar * tracker_file_get_vfs_name (const gchar *uri);
+void tracker_path_remove (const gchar *uri);
+GSList * tracker_path_list_filter_duplicates (GSList *roots);
#endif /* __LIBTRACKER_COMMON_FILE_UTILS_H__ */
Modified: branches/xesam-support/src/trackerd/tracker-crawler.c
==============================================================================
--- branches/xesam-support/src/trackerd/tracker-crawler.c (original)
+++ branches/xesam-support/src/trackerd/tracker-crawler.c Fri Jun 13 14:31:04 2008
@@ -24,12 +24,14 @@
#include <gio/gio.h>
-#include <libtracker-common/tracker-utils.h>
#include <libtracker-common/tracker-dbus.h>
+#include <libtracker-common/tracker-file-utils.h>
+#include <libtracker-common/tracker-utils.h>
#include "tracker-crawler.h"
#include "tracker-dbus.h"
#include "tracker-indexer-client.h"
+#include "tracker-monitor.h"
#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TRACKER_TYPE_CRAWLER, TrackerCrawlerPriv))
@@ -653,7 +655,7 @@
GFileEnumerator *enumerator;
GFileInfo *info;
GFile *parent, *child;
- gchar *relative_path;
+ gchar *path;
crawler = TRACKER_CRAWLER (user_data);
parent = G_FILE (file);
@@ -670,30 +672,30 @@
info && crawler->priv->running;
info = g_file_enumerator_next_file (enumerator, NULL, NULL)) {
child = g_file_get_child (parent, g_file_info_get_name (info));
- relative_path = g_file_get_path (child);
+ path = g_file_get_path (child);
- if (path_should_be_ignored (crawler, relative_path)) {
+ if (path_should_be_ignored (crawler, path)) {
crawler->priv->files_ignored++;
#ifdef TESTING
g_debug ("Ignored:'%s' (%d)",
- relative_path,
+ path,
crawler->priv->enumerations);
#endif /* TESTING */
- g_free (relative_path);
+ g_free (path);
} else {
crawler->priv->files_found++;
#ifdef TESTING
g_debug ("Found :'%s' (%d)",
- relative_path,
+ path,
crawler->priv->enumerations);
#endif /* TESTING */
if (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY) {
file_enumerate (crawler, child);
- g_free (relative_path);
+ g_free (path);
} else {
g_async_queue_push (crawler->priv->files,
- relative_path);
+ path);
}
}
@@ -718,6 +720,8 @@
{
file_enumerators_increment (crawler);
+ tracker_monitor_add (file);
+
g_file_enumerate_children_async (file,
"*",
G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
@@ -727,52 +731,11 @@
crawler);
}
-static gboolean
-file_queue_handle_cb (gpointer user_data)
+static void
+on_process_files_cb (DBusGProxy *proxy, GError *error, gpointer user_data)
{
- TrackerCrawler *crawler;
- DBusGProxy *proxy;
- GError *error;
- gchar ** files;
- gboolean running;
- gint length;
-#if 0
- gint items;
- GPtrArray *ptr_array;
- gint i;
-#endif
-
- crawler = user_data;
-
- length = g_async_queue_length (crawler->priv->files);
- if (length < 1) {
- g_debug ("Processing file queue... nothing to do, queue empty");
- return TRUE;
- }
+ GStrv files = user_data;
- /* Check we can actually talk to the indexer */
- proxy = tracker_dbus_indexer_get_proxy ();
- error = NULL;
-
- org_freedesktop_Tracker_Indexer_get_running (proxy,
- &running,
- &error);
- if (error || !running) {
- g_message ("Couldn't process files, %s",
- error ? error->message : "indexer not running");
- g_clear_error (&error);
- return TRUE;
- }
-
- g_debug ("Processing file queue...");
- files = tracker_dbus_async_queue_to_strv (crawler->priv->files,
- FILES_QUEUE_PROCESS_MAX);
-
- g_debug ("Sending %d files to indexer to process", g_strv_length (files));
- org_freedesktop_Tracker_Indexer_process_files (proxy,
- (const gchar **) files,
- &error);
-
if (error) {
g_critical ("Could not send %d files to indexer to process, %s",
g_strv_length (files),
@@ -783,78 +746,58 @@
}
g_strfreev (files);
-
- return TRUE;
}
-static GSList *
-check_roots_dont_coinside (TrackerCrawler *crawler,
- GSList *roots)
-{
- GSList *checked_roots = NULL;
- GSList *l1, *l2;
-
- /* ONLY HERE do we add separators on each location we check.
- * The reason for this is that these locations are user
- * entered in the configuration and we need to make sure we
- * don't include the same location more than once.
- */
-
- for (l1 = roots; l1; l1 = l1->next) {
- gchar *path;
- gboolean should_add = TRUE;
+static void
+on_get_running (DBusGProxy *proxy, gboolean running, GError *error, gpointer user_data)
+{
+ TrackerCrawler *crawler = user_data;
+ gchar ** files;
- if (!g_str_has_suffix (l1->data, G_DIR_SEPARATOR_S)) {
- path = g_strconcat (l1->data, G_DIR_SEPARATOR_S, NULL);
- } else {
- path = g_strdup (l1->data);
- }
+ if (!error && running) {
+ g_debug ("Processing file queue...");
+ files = tracker_dbus_async_queue_to_strv (crawler->priv->files,
+ FILES_QUEUE_PROCESS_MAX);
- l2 = checked_roots;
+ g_debug ("Sending %d files to indexer to process", g_strv_length (files));
- while (l2 && should_add) {
- /* If the new path exists as a lower level
- * path or is the same as an existing checked
- * root we disgard it, it will be checked
- * anyway.
- */
- if (g_str_has_prefix (path, l2->data)) {
- should_add = FALSE;
- }
-
- /* If the new path exists as a higher level
- * path to one already in the checked roots,
- * we remove the checked roots version
- */
- if (g_str_has_prefix (l2->data, path)) {
- checked_roots = g_slist_remove_link (checked_roots, l2);
- g_free (l2->data);
- l2 = checked_roots;
- continue;
- }
+ org_freedesktop_Tracker_Indexer_process_files_async (proxy,
+ (const gchar **) files,
+ on_process_files_cb,
+ files);
- l2 = l2->next;
- }
-
- if (should_add) {
- checked_roots = g_slist_prepend (checked_roots, path);
- continue;
- }
-
- g_free (path);
+ } else {
+ g_message ("Couldn't process files, %s",
+ error ? error->message : "indexer not running");
}
- checked_roots = g_slist_reverse (checked_roots);
+ g_object_unref (crawler);
+}
-#ifdef TESTING
- g_debug ("Using the following roots to crawl:");
+static gboolean
+file_queue_handle_cb (gpointer user_data)
+{
+ TrackerCrawler *crawler;
+ DBusGProxy *proxy;
+ gint length;
- for (l1 = checked_roots; l1; l1 = l1->next) {
- g_debug (" %s", (gchar*) l1->data);
+ crawler = user_data;
+
+ length = g_async_queue_length (crawler->priv->files);
+ if (length < 1) {
+ g_debug ("Processing file queue... nothing to do, queue empty");
+ return TRUE;
}
-#endif /* TESTING */
- return checked_roots;
+ /* Check we can actually talk to the indexer */
+ proxy = tracker_dbus_indexer_get_proxy ();
+
+ org_freedesktop_Tracker_Indexer_get_running_async (proxy,
+ on_get_running,
+ g_object_ref (crawler));
+
+
+ return TRUE;
}
void
@@ -886,7 +829,7 @@
config_roots = tracker_config_get_crawl_directory_roots (priv->config);
if (config_roots) {
/* Make sure none of the roots co-inside each other */
- roots = check_roots_dont_coinside (crawler, config_roots);
+ roots = tracker_path_list_filter_duplicates (config_roots);
}
if (!roots) {
Modified: branches/xesam-support/src/trackerd/tracker-db.c
==============================================================================
--- branches/xesam-support/src/trackerd/tracker-db.c (original)
+++ branches/xesam-support/src/trackerd/tracker-db.c Fri Jun 13 14:31:04 2008
@@ -555,13 +555,19 @@
const gchar *moved_from_uri,
const gchar *moved_to_uri)
{
+ /* FIXME: the monitor updates should not be done here, -mr */
+
+#if 0
/* Stop watching old dir, start watching new dir */
tracker_monitor_remove (moved_from_uri, TRUE);
+#endif
tracker_db_file_move (iface, moved_from_uri, moved_to_uri);
directory_move_files (iface, moved_from_uri, moved_to_uri);
+#if 0
tracker_monitor_add (moved_to_uri);
+#endif
}
static gint
Modified: branches/xesam-support/src/trackerd/tracker-email-kmail.c
==============================================================================
--- branches/xesam-support/src/trackerd/tracker-email-kmail.c (original)
+++ branches/xesam-support/src/trackerd/tracker-email-kmail.c Fri Jun 13 14:31:04 2008
@@ -663,7 +663,7 @@
(( in_imap_dir && dir_name[0] == '.' && g_str_has_suffix (dir_name, ".directory")) ||
!in_imap_dir )
) {
- if (!tracker_monitor_is_watched (dir_path)) {
+ if (!tracker_monitor_is_watched_by_string (dir_path)) {
/* if we are in a maildir directory, we will only index emails in directory "cur" */
gchar *dir_cur = g_build_filename (dir_path, "cur", NULL);
Modified: branches/xesam-support/src/trackerd/tracker-monitor.c
==============================================================================
--- branches/xesam-support/src/trackerd/tracker-monitor.c (original)
+++ branches/xesam-support/src/trackerd/tracker-monitor.c Fri Jun 13 14:31:04 2008
@@ -18,7 +18,9 @@
* Boston, MA 02110-1301, USA.
*/
-#include <gio/gio.h>
+#include <string.h>
+
+#include <libtracker-common/tracker-file-utils.h>
#include "tracker-monitor.h"
@@ -44,9 +46,9 @@
}
if (!monitors) {
- monitors = g_hash_table_new_full (g_str_hash,
- g_str_equal,
- g_free,
+ monitors = g_hash_table_new_full (g_file_hash,
+ (GEqualFunc) g_file_equal,
+ (GDestroyNotify) g_object_unref,
(GDestroyNotify) g_file_monitor_cancel);
}
@@ -67,16 +69,69 @@
}
}
+static const gchar *
+monitor_event_to_string (GFileMonitorEvent event_type)
+{
+ switch (event_type) {
+ case G_FILE_MONITOR_EVENT_CHANGED:
+ return "G_FILE_MONITOR_EVENT_CHANGED";
+ case G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT:
+ return "G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT";
+ case G_FILE_MONITOR_EVENT_DELETED:
+ return "G_FILE_MONITOR_EVENT_DELETED";
+ case G_FILE_MONITOR_EVENT_CREATED:
+ return "G_FILE_MONITOR_EVENT_CREATED";
+ case G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED:
+ return "G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED";
+ case G_FILE_MONITOR_EVENT_PRE_UNMOUNT:
+ return "G_FILE_MONITOR_EVENT_PRE_UNMOUNT";
+ case G_FILE_MONITOR_EVENT_UNMOUNTED:
+ return "G_FILE_MONITOR_EVENT_UNMOUNTED";
+ }
+
+ return "unknown";
+}
+
+static void
+monitor_event_cb (GFileMonitor *monitor,
+ GFile *file,
+ GFile *other_file,
+ GFileMonitorEvent event_type,
+ gpointer user_data)
+{
+ gchar *str1;
+ gchar *str2;
+
+ str1 = g_file_get_path (file);
+
+ if (other_file) {
+ str2 = g_file_get_path (other_file);
+ } else {
+ str2 = g_strdup ("");
+ }
+
+ g_message ("Received monitor event:%d->'%s' for file:'%s' and other file:'%s'",
+ event_type,
+ monitor_event_to_string (event_type),
+ str1,
+ str2);
+
+ g_free (str1);
+ g_free (str2);
+}
+
gboolean
-tracker_monitor_add (const gchar *path)
+tracker_monitor_add (GFile *file)
{
- GFile *file;
GFileMonitor *monitor;
+ GSList *ignored_roots;
+ GSList *l;
GError *error = NULL;
+ gchar *path;
- g_return_val_if_fail (path != NULL, FALSE);
+ g_return_val_if_fail (G_IS_FILE (file), FALSE);
- if (g_hash_table_lookup (monitors, path)) {
+ if (g_hash_table_lookup (monitors, file)) {
return TRUE;
}
@@ -88,63 +143,101 @@
return FALSE;
}
+ path = g_file_get_path (file);
+
+ ignored_roots = tracker_config_get_no_watch_directory_roots (config);
+ /* Check this location isn't excluded in the config */
+ for (l = ignored_roots; l; l = l->next) {
+ if (strcmp (path, l->data) == 0) {
+ g_message ("Not adding montior for:'%s', path is in config ignore list",
+ path);
+ g_free (path);
+ return FALSE;
+ }
+ }
+
/* We don't check if a file exists or not since we might want
* to monitor locations which don't exist yet.
+ *
+ * Also, we assume ALL paths passed are directories.
*/
- file = g_file_new_for_path (path);
monitor = g_file_monitor_directory (file,
G_FILE_MONITOR_WATCH_MOUNTS,
NULL,
&error);
- g_object_unref (file);
if (error) {
g_warning ("Could not add monitor for path:'%s', %s",
path,
error->message);
+ g_free (path);
g_error_free (error);
return FALSE;
}
- g_debug ("Added monitor for:'%s', total monitors:%d",
- path,
- g_hash_table_size (monitors));
+ g_signal_connect (monitor, "changed",
+ G_CALLBACK (monitor_event_cb),
+ NULL);
g_hash_table_insert (monitors,
- g_strdup (path),
+ g_object_ref (file),
monitor);
+
+ g_message ("Added monitor for:'%s', total monitors:%d",
+ path,
+ g_hash_table_size (monitors));
+
+ g_free (path);
return TRUE;
}
gboolean
-tracker_monitor_remove (const gchar *path,
- gboolean delete_subdirs)
+tracker_monitor_remove (GFile *file,
+ gboolean delete_subdirs)
{
GFileMonitor *monitor;
+ gchar *path;
- g_return_val_if_fail (path != NULL, FALSE);
+ g_return_val_if_fail (G_IS_FILE (file), FALSE);
- monitor = g_hash_table_lookup (monitors, path);
+ monitor = g_hash_table_lookup (monitors, file);
if (!monitor) {
return TRUE;
}
- g_hash_table_remove (monitors, path);
+ g_hash_table_remove (monitors, file);
- g_debug ("Removed monitor for:'%s', total monitors:%d",
- path,
- g_hash_table_size (monitors));
+ path = g_file_get_path (file);
+ g_message ("Removed monitor for:'%s', total monitors:%d",
+ path,
+ g_hash_table_size (monitors));
+ g_free (path);
return TRUE;
}
gboolean
-tracker_monitor_is_watched (const gchar *path)
+tracker_monitor_is_watched (GFile *file)
{
+ g_return_val_if_fail (G_IS_FILE (file), FALSE);
+
+ return g_hash_table_lookup (monitors, file) != NULL;
+}
+
+gboolean
+tracker_monitor_is_watched_by_string (const gchar *path)
+{
+ GFile *file;
+ gboolean watched;
+
g_return_val_if_fail (path != NULL, FALSE);
- return g_hash_table_lookup (monitors, path) != NULL;
+ file = g_file_new_for_path (path);
+ watched = g_hash_table_lookup (monitors, file) != NULL;
+ g_object_unref (file);
+
+ return watched;
}
gint
Modified: branches/xesam-support/src/trackerd/tracker-monitor.h
==============================================================================
--- branches/xesam-support/src/trackerd/tracker-monitor.h (original)
+++ branches/xesam-support/src/trackerd/tracker-monitor.h Fri Jun 13 14:31:04 2008
@@ -22,19 +22,21 @@
#ifndef __TRACKERD_MONITOR_H__
#define __TRACKERD_MONITOR_H__
-#include <libtracker-common/tracker-config.h>
+#include <gio/gio.h>
-#include "tracker-db.h"
+#include <libtracker-common/tracker-config.h>
G_BEGIN_DECLS
-gboolean tracker_monitor_init (TrackerConfig *config);
-void tracker_monitor_shutdown (void);
-gboolean tracker_monitor_add (const gchar *path);
-gboolean tracker_monitor_remove (const gchar *path,
- gboolean delete_subdirs);
-gboolean tracker_monitor_is_watched (const gchar *path);
-gint tracker_monitor_get_count (void);
+gboolean tracker_monitor_init (TrackerConfig *config);
+void tracker_monitor_shutdown (void);
+gboolean tracker_monitor_add (GFile *file);
+gboolean tracker_monitor_remove (GFile *file,
+ gboolean delete_subdirs);
+gboolean tracker_monitor_is_watched (GFile *file);
+gboolean tracker_monitor_is_watched_by_string (const gchar *path);
+gint tracker_monitor_get_count (void);
+
G_END_DECLS
Modified: branches/xesam-support/src/trackerd/tracker-process-files.c
==============================================================================
--- branches/xesam-support/src/trackerd/tracker-process-files.c (original)
+++ branches/xesam-support/src/trackerd/tracker-process-files.c Fri Jun 13 14:31:04 2008
@@ -251,7 +251,10 @@
continue;
}
+#if 0
+ /* Done in the crawler module now */
tracker_monitor_add (dir);
+#endif
}
for (l = list; l; l = l->next) {
@@ -398,7 +401,10 @@
tracker_db_directory_delete (iface, info->file_id, info->uri);
+#if 0
+ /* Done in the crawler module now */
tracker_monitor_remove (info->uri, TRUE);
+#endif
g_message ("Deleting directory:'%s' and subdirs", info->uri);
}
@@ -681,7 +687,10 @@
break;
case TRACKER_DB_ACTION_DIRECTORY_MOVED_FROM:
- tracker_db_directory_move (iface, info->uri, info->moved_to_uri);
+#if 0
+ /* We should be sending this crap to the indexer */
+ tracker_db_directory_move (iface, info->uri, info->moved_to_uri);
+#endif
need_index = FALSE;
break;
Modified: branches/xesam-support/tests/libtracker-common/Makefile.am
==============================================================================
--- branches/xesam-support/tests/libtracker-common/Makefile.am (original)
+++ branches/xesam-support/tests/libtracker-common/Makefile.am Fri Jun 13 14:31:04 2008
@@ -2,14 +2,15 @@
noinst_PROGRAMS = $(TEST_PROGS)
-TEST_PROGS += tracker-ontology
+TEST_PROGS += tracker-ontology tracker-dbus
-INCLUDES = \
- -g \
- -DG_LOG_DOMAIN=\"Tracker\" \
- -I$(top_srcdir)/src \
- $(GMODULE_CFLAGS) \
- $(GTHREAD_CFLAGS) \
+INCLUDES = \
+ -g \
+ -DG_LOG_DOMAIN=\"Tracker\" \
+ -I$(top_srcdir)/src \
+ $(DBUS_CFLAGS) \
+ $(GMODULE_CFLAGS) \
+ $(GTHREAD_CFLAGS) \
$(GLIB2_CFLAGS)
@@ -17,8 +18,19 @@
tracker_ontology_SOURCES = \
tracker-ontology-test.c
-tracker_ontology_LDADD = \
+tracker_ontology_LDADD = \
$(top_builddir)/src/libtracker-common/libtracker-common.la \
$(GMODULE_LIBS) \
$(GTHREAD_LIBS) \
$(GLIB2_LIBS)
+
+
+tracker_dbus_SOURCES = \
+ tracker-dbus-test.c
+
+tracker_dbus_LDADD = \
+ $(top_builddir)/src/libtracker-common/libtracker-common.la \
+ $(DBUS_LIBS) \
+ $(GMODULE_LIBS) \
+ $(GTHREAD_LIBS) \
+ $(GLIB2_LIBS)
Modified: branches/xesam-support/tests/trackerd/tracker-xesam-session-test.c
==============================================================================
--- branches/xesam-support/tests/trackerd/tracker-xesam-session-test.c (original)
+++ branches/xesam-support/tests/trackerd/tracker-xesam-session-test.c Fri Jun 13 14:31:04 2008
@@ -125,7 +125,7 @@
if (!gtx_wait_for_signal (G_OBJECT(fix->session), TIMEOUT, "ready"))
g_critical ("'ready' signal emitted twice");
-
+
g_assert (xesam_g_session_is_ready (fix->session));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]