- New release 0.6.5

This commit is contained in:
Deji Akingunola 2008-02-28 05:55:33 +00:00
parent b5123c150d
commit e064c458a5
4 changed files with 7 additions and 254 deletions

View File

@ -1 +1 @@
tracker-0.6.4.tar.bz2
tracker-0.6.5.tar.bz2

View File

@ -1 +1 @@
4f2d250d65f0be283ae456aede99a85b tracker-0.6.4.tar.bz2
71a510aab9153b0b8fe01d0af3b359ba tracker-0.6.5.tar.bz2

View File

@ -1,248 +0,0 @@
--- src/trackerd/tracker-indexer.c 2007/12/10 23:37:31 1068
+++ src/trackerd/tracker-indexer.c 2007/12/11 21:16:02 1076
@@ -215,7 +215,7 @@
}
if (!word_index) {
- tracker_log ("%s index was not closed properly and caused error %s- attempting repair", name, dperrmsg (dpecode));
+ tracker_error ("%s index was not closed properly and caused error %s- attempting repair", name, dperrmsg (dpecode));
if (dprepair (name)) {
word_index = dpopen (name, DP_OWRITER | DP_OCREAT | DP_ONOLCK, tracker->min_index_bucket_count);
} else {
@@ -228,6 +228,16 @@
}
+static inline char *
+get_index_file (const char *name)
+{
+ char *word_dir;
+
+ word_dir = g_build_filename (tracker->data_dir, name, NULL);
+
+ return word_dir;
+}
+
Indexer *
tracker_indexer_open (const gchar *name)
{
@@ -237,7 +247,7 @@
if (!name) return NULL;
- word_dir = g_build_filename (tracker->data_dir, name, NULL);
+ word_dir = get_index_file (name);
word_index = open_index (word_dir);
@@ -504,7 +514,7 @@
}
static void
-move_index (Indexer *src_index, Indexer *dest_index)
+move_index (Indexer *src_index, Indexer *dest_index, const char *fname)
{
if (!src_index || !dest_index) {
@@ -515,8 +525,6 @@
/* remove existing main index */
g_mutex_lock (dest_index->word_mutex);
- char *fname = dpname (dest_index->word_index);
-
dpclose (dest_index->word_index);
dpremove (fname);
@@ -526,7 +534,9 @@
tracker_indexer_close (src_index);
/* rename and reopen final index as main index */
-
+
+ tracker_log ("renaming %s to %s", final_name, fname);
+
rename (final_name, fname);
dest_index->word_index = open_index (fname);
@@ -535,7 +545,6 @@
tracker_error ("index creation failure for %s from %s", fname, final_name);
}
- g_free (fname);
g_free (final_name);
g_mutex_unlock (dest_index->word_mutex);
@@ -556,7 +565,7 @@
if (type == INDEX_TYPE_FILES) {
g_return_if_fail (tracker->file_index);
-
+
prefix = "file-index.tmp.";
index_list = g_slist_prepend (index_list, tracker->file_index);
@@ -571,7 +580,7 @@
prefix = "email-index.tmp.";
g_return_if_fail (tracker->email_index);
-
+
index_list = g_slist_prepend (index_list, tracker->email_index);
char *tmp = g_build_filename (tracker->data_dir, "email-index-final", NULL);
@@ -748,6 +757,9 @@
g_free (str);
}
+
+
+
/* dont free last entry as that is the main index */
if (lst->next) {
@@ -757,7 +769,17 @@
} else {
- move_index (final_index, index);
+ if (type == INDEX_TYPE_FILES) {
+
+ char *fname = get_index_file ("file-index.db");
+ move_index (final_index, tracker->file_index, fname);
+ g_free (fname);
+
+ } else {
+ char *fname = get_index_file ("email-index.db");
+ move_index (final_index, tracker->email_index, fname);
+ g_free (fname);
+ }
}
}
--- src/trackerd/tracker-utils.c 2007/12/11 18:29:27 1075
+++ src/trackerd/tracker-utils.c 2007/12/13 23:55:10 1079
@@ -3491,11 +3491,13 @@
/* logging is thread safe */
static size_t log_size = 0;
- if (! message)
+ if (!message)
return;
g_print ("%s\n", message);
+ if (!tracker->log_file) return;
+
/* ensure file logging is thread safe */
g_mutex_lock (tracker->log_access_mutex);
--- src/trackerd/trackerd.c 2007/12/11 02:57:07 1070
+++ src/trackerd/trackerd.c 2007/12/13 23:55:10 1079
@@ -618,19 +618,13 @@
static void
signal_handler (gint signo)
{
- if (!tracker->is_running) {
- return;
- }
-
static gboolean in_loop = FALSE;
- /* avoid re-entrant signals handler calls */
- if (in_loop && signo != SIGSEGV) {
- return;
+ /* die if we get re-entrant signals handler calls */
+ if (in_loop) {
+ exit (EXIT_FAILURE);
}
- in_loop = TRUE;
-
switch (signo) {
case SIGSEGV:
@@ -646,6 +640,8 @@
case SIGTERM:
case SIGINT:
+ in_loop = TRUE;
+
tracker->is_running = FALSE;
tracker_end_watching ();
@@ -660,8 +656,7 @@
if (tracker->log_file && g_strsignal (signo)) {
tracker_log ("Received signal %s ", g_strsignal (signo));
}
- in_loop = FALSE;
- break;
+ break;
}
}
@@ -2422,6 +2417,14 @@
if (!g_thread_supported ())
g_thread_init (NULL);
+ dbus_g_thread_init ();
+
+ tracker = g_new0 (Tracker, 1);
+
+ tracker->dbus_con = tracker_dbus_init ();
+
+ add_local_dbus_connection_monitoring (tracker->dbus_con);
+
setlocale (LC_ALL, "");
bindtextdomain (GETTEXT_PACKAGE, TRACKER_LOCALEDIR);
@@ -2478,20 +2481,14 @@
sigaction (SIGINT, &act, NULL);
#endif
- dbus_g_thread_init ();
+
- tracker = g_new0 (Tracker, 1);
+
tracker->status = STATUS_INIT;
tracker->is_running = FALSE;
- tracker->log_file = g_build_filename (tracker->root_dir, "tracker.log", NULL);
-
- tracker->dbus_con = tracker_dbus_init ();
-
- add_local_dbus_connection_monitoring (tracker->dbus_con);
-
/* Make a temporary directory for Tracker into g_get_tmp_dir() directory */
gchar *tmp_dir;
@@ -2505,6 +2502,16 @@
tracker->config_dir = g_strdup (g_get_user_config_dir ());
tracker->user_data_dir = g_build_filename (tracker->root_dir, "data", NULL);
+ tracker->log_file = g_build_filename (tracker->root_dir, "tracker.log", NULL);
+
+ /* reset log file */
+ tracker_unlink (tracker->log_file);
+
+ tracker_log ("starting log");
+
+
+
+
g_free (tmp_dir);
/* remove an existing one */
@@ -2636,9 +2643,7 @@
ioprio ();
#endif
- /* reset log file */
- tracker_unlink (tracker->log_file);
-
+
/* deal with config options with defaults, config file and option params */
set_defaults ();

View File

@ -1,12 +1,11 @@
Summary: An object database, tag/metadata database, search tool and indexer
Name: tracker
Version: 0.6.4
Release: 7%{?dist}
Version: 0.6.5
Release: 1%{?dist}
License: GPLv2+
Group: Applications/System
URL: http://www.gnome.org/~jamiemcc/tracker/
Source0: http://www.gnome.org/~jamiemcc/tracker/%{name}-%{version}.tar.bz2
Patch0: tracker-assorted_fixes.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gmime-devel, poppler-devel, gettext
BuildRequires: gnome-desktop-devel, gamin-devel, libnotify-devel
@ -52,7 +51,6 @@ GNOME libraries
%prep
%setup -q
%patch0 -p0 -b .fix
%define deskbar_applet_ver %(pkg-config --modversion deskbar-applet)
%if "%deskbar_applet_ver" >= "2.19.4"
@ -139,6 +137,9 @@ fi
%{_sysconfdir}/xdg/autostart/tracker-applet.desktop
%changelog
* Thu Feb 28 2008 Deji Akingunola <dakingun@gmail.com> - 0.6.5-1
- New release 0.6.5
* Fri Feb 22 2008 Deji Akingunola <dakingun@gmail.com> - 0.6.4-7
- Ship the tracker-applet program in the tracker-search-tool subpackage
(Bug #434551)