Merge lp:~chrisccoulson/tracker/jaunty-sru into lp:~ubuntu-desktop/tracker/ubuntu

Proposed by Chris Coulson
Status: Merged
Merged at revision: not available
Proposed branch: lp:~chrisccoulson/tracker/jaunty-sru
Merge into: lp:~ubuntu-desktop/tracker/ubuntu
Diff against target: None lines
To merge this branch: bzr merge lp:~chrisccoulson/tracker/jaunty-sru
Reviewer Review Type Date Requested Status
Martin Pitt Pending
Review via email: mp+5910@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Hi Martin,

Here is the SRU for Tracker. I've reverted the change that installs the Evolution plugin for now, as indexing doesn't work with this anyway (confirmed by me and someone else too). This needs some more investigation really.

These changes fix the following 2 bugs:

https://bugs.edge.launchpad.net/ubuntu/+source/tracker/+bug/359207
https://bugs.edge.launchpad.net/ubuntu/+source/tracker/+bug/361205

Thanks
Chris

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2009-04-14 11:44:38 +0000
+++ debian/changelog 2009-04-26 23:09:37 +0000
@@ -1,10 +1,19 @@
1tracker (0.6.93-0ubuntu2) UNRELEASED; urgency=low1tracker (0.6.93-0ubuntu2) UNRELEASED; urgency=low
22
3 * debian/tracker.install:3 * debian/patches/20_index_error_auto_reindex.patch:
4 - Install Evolution EPlugin so that Evolution indexing works4 - Automatically reindex if the index becomes corrupt as opposed
5 (LP: #360399).5 to displaying a notification with reindex action, which requires
6 user intervention and results in a confusing fallback notification.
7 Reindexing is the only sane way to recover from a corrupt index
8 anyway (LP: #361205).
9 * debian/patches/21_remove_all_indexes_on_reindex.patch:
10 - Ensure that all index files are removed when a reindex is
11 requested.
12 * debian/patches/30_dont_index_removeable_media.patch:
13 - Don't start indexing when removeable media is inserted and
14 indexing is disabled in the preferences (LP: #359207).
615
7 -- Chris Coulson <chrisccoulson@googlemail.com> Tue, 14 Apr 2009 12:13:43 +010016 -- Chris Coulson <chrisccoulson@googlemail.com> Wed, 22 Apr 2009 20:13:41 +0100
817
9tracker (0.6.93-0ubuntu1) jaunty; urgency=low18tracker (0.6.93-0ubuntu1) jaunty; urgency=low
1019
1120
=== added file 'debian/patches/20_index_error_auto_reindex.patch'
--- debian/patches/20_index_error_auto_reindex.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/20_index_error_auto_reindex.patch 2009-04-17 14:24:09 +0000
@@ -0,0 +1,187 @@
1Index: tracker-0.6.93/src/tracker-applet/tracker-applet.c
2===================================================================
3--- tracker-0.6.93.orig/src/tracker-applet/tracker-applet.c 2009-04-17 14:18:21.000000000 +0100
4+++ tracker-0.6.93/src/tracker-applet/tracker-applet.c 2009-04-17 14:56:09.000000000 +0100
5@@ -1061,6 +1061,25 @@
6 }
7
8 static void
9+restart_tracker_actual (TrayIcon *icon)
10+{
11+ TrayIconPrivate *priv;
12+
13+ debug ("Attempting to restart tracker\n");
14+
15+ priv = TRAY_ICON_GET_PRIVATE (icon);
16+ priv->reindex = TRUE;
17+
18+ dbus_g_proxy_begin_call (priv->tracker->proxy,
19+ "Shutdown",
20+ NULL,
21+ NULL,
22+ NULL,
23+ G_TYPE_BOOLEAN,
24+ TRUE, G_TYPE_INVALID);
25+}
26+
27+static void
28 restart_tracker (GtkDialog *dialog,
29 gint response,
30 TrayIcon *icon)
31@@ -1068,57 +1087,64 @@
32 gtk_widget_destroy (GTK_WIDGET (dialog));
33
34 if (response == GTK_RESPONSE_YES) {
35- TrayIconPrivate *priv;
36-
37- debug ("Attempting to restart tracker\n");
38-
39- priv = TRAY_ICON_GET_PRIVATE (icon);
40- priv->reindex = TRUE;
41-
42- dbus_g_proxy_begin_call (priv->tracker->proxy,
43- "Shutdown",
44- NULL,
45- NULL,
46- NULL,
47- G_TYPE_BOOLEAN,
48- TRUE, G_TYPE_INVALID);
49+ restart_tracker_actual (icon);
50 }
51 }
52
53 static void
54 reindex (GtkMenuItem *item,
55- TrayIcon *icon)
56+ TrayIcon *icon,
57+ gboolean no_confirm)
58 {
59 GtkWidget *dialog;
60 gchar *primary;
61 gchar *secondary;
62+
63+ if (!no_confirm)
64+ {
65+ primary = g_strdup (_("Re-index your system?"));
66+ secondary =
67+ g_strdup (_("Indexing can take a long time. "
68+ "Are you sure you want to re-index?"));
69+
70+ dialog = gtk_message_dialog_new (NULL,
71+ GTK_DIALOG_MODAL,
72+ GTK_MESSAGE_WARNING,
73+ GTK_BUTTONS_YES_NO,
74+ "%s",
75+ primary);
76+
77+ gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
78+ "%s",
79+ secondary);
80+
81+ g_free (primary);
82+ g_free (secondary);
83+
84+ gtk_window_set_title (GTK_WINDOW (dialog), "");
85+ gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
86+ gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14);
87+
88+ g_signal_connect (G_OBJECT (dialog), "response",
89+ G_CALLBACK (restart_tracker), icon);
90+ gtk_widget_show (dialog);
91+ } else {
92+ restart_tracker_actual (icon);
93+ }
94+}
95
96- primary = g_strdup (_("Re-index your system?"));
97- secondary =
98- g_strdup (_("Indexing can take a long time. "
99- "Are you sure you want to re-index?"));
100-
101- dialog = gtk_message_dialog_new (NULL,
102- GTK_DIALOG_MODAL,
103- GTK_MESSAGE_WARNING,
104- GTK_BUTTONS_YES_NO,
105- "%s",
106- primary);
107-
108- gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
109- "%s",
110- secondary);
111-
112- g_free (primary);
113- g_free (secondary);
114-
115- gtk_window_set_title (GTK_WINDOW (dialog), "");
116- gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
117- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14);
118+static void
119+reindex_no_confirmation (GtkMenuItem *item,
120+ TrayIcon *icon)
121+{
122+ reindex (item, icon, TRUE);
123+}
124
125- g_signal_connect (G_OBJECT (dialog), "response",
126- G_CALLBACK (restart_tracker), icon);
127- gtk_widget_show (dialog);
128+static void
129+reindex_with_confirmation (GtkMenuItem *item,
130+ TrayIcon *icon)
131+{
132+ reindex (item, icon, FALSE);
133 }
134
135 static void
136@@ -1486,7 +1512,7 @@
137 image = gtk_image_new_from_icon_name (GTK_STOCK_FIND,
138 GTK_ICON_SIZE_MENU);
139 gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
140- g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (reindex),
141+ g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (reindex_with_confirmation),
142 icon);
143 gtk_menu_shell_append (GTK_MENU_SHELL (priv->menu), item);
144
145@@ -2088,14 +2114,6 @@
146 }
147
148 static void
149-error_notification_reindex_cb (NotifyNotification *notification,
150- const gchar *action,
151- gpointer user_data)
152-{
153- reindex (NULL, user_data);
154-}
155-
156-static void
157 error_notification_closed_cb (NotifyNotification *notification,
158 gpointer user_data)
159 {
160@@ -2130,23 +2148,18 @@
161 NULL,
162 priv->icon);
163
164- notify_notification_set_timeout (error_notification, NOTIFY_EXPIRES_NEVER);
165 notify_notification_set_urgency (error_notification, NOTIFY_URGENCY_CRITICAL);
166
167 g_signal_connect (error_notification, "closed",
168 G_CALLBACK (error_notification_closed_cb), NULL);
169
170- if (requires_reindex) {
171- notify_notification_add_action (error_notification,
172- "reindex",
173- _("Reindex all contents"),
174- NOTIFY_ACTION_CALLBACK (error_notification_reindex_cb),
175- icon, NULL);
176- }
177-
178 notify_notification_show (error_notification, NULL);
179
180 g_free (msg);
181+
182+ if (requires_reindex) {
183+ reindex_no_confirmation (NULL, icon);
184+ }
185 }
186
187 GType
0188
=== added file 'debian/patches/21_remove_all_indexes_on_reindex.patch'
--- debian/patches/21_remove_all_indexes_on_reindex.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/21_remove_all_indexes_on_reindex.patch 2009-04-22 19:16:57 +0000
@@ -0,0 +1,12 @@
1Index: tracker-0.6.93/src/trackerd/tracker-main.c
2===================================================================
3--- tracker-0.6.93.orig/src/trackerd/tracker-main.c 2009-04-22 20:12:17.000000000 +0100
4+++ tracker-0.6.93/src/trackerd/tracker-main.c 2009-04-22 20:13:03.000000000 +0100
5@@ -641,6 +641,7 @@
6 /* If we are reindexing, just remove the databases */
7 if (private->reindex_on_shutdown) {
8 tracker_db_manager_remove_all ();
9+ tracker_db_index_manager_remove_all ();
10 }
11 }
12
013
=== added file 'debian/patches/30_dont_index_removable_media.patch'
--- debian/patches/30_dont_index_removable_media.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/30_dont_index_removable_media.patch 2009-04-22 16:31:58 +0000
@@ -0,0 +1,42 @@
1# Don't start indexing when removable media is inserted and indexing is disabled in the preferences.
2# Launchpad: https://bugs.launchpad.net/bugs/359207
3# Bugzilla: https://bugs.edge.launchpad.net/ubuntu/+source/tracker/+bug/359207
4# Commits: 4581372459a09fb2ce5030124265c61b11eb5f84 and 337c3ebfc5585534bf0a2129ec8589eea56b2840
5Index: tracker-0.6.93/src/trackerd/tracker-processor.c
6===================================================================
7--- tracker-0.6.93.orig/src/trackerd/tracker-processor.c 2009-04-22 17:25:05.000000000 +0100
8+++ tracker-0.6.93/src/trackerd/tracker-processor.c 2009-04-22 17:26:35.000000000 +0100
9@@ -857,7 +857,7 @@
10 file = g_file_new_for_path (root);
11 tracker_monitor_add (processor->private->monitor, module_name, file);
12 g_object_unref (file);
13-
14+
15 tracker_crawler_special_paths_add (crawler, root);
16
17 break;
18@@ -1031,6 +1031,13 @@
19 const gchar *module_name;
20 gboolean is_removable_media;
21
22+ if (tracker_status_get_is_readonly ()) {
23+ /* Block any request to process
24+ * modules if indexing is not enabled
25+ */
26+ return;
27+ }
28+
29 /* Don't recursively iterate the modules if this function is
30 * called, check first.
31 */
32@@ -1784,6 +1791,10 @@
33 processor->private->finished = TRUE;
34 g_signal_emit (processor, signals[FINISHED], 0);
35 } else {
36+ /* Set status to IDLE, so it isn't left to any other state
37+ * if there are no files to be sent to the indexer.
38+ */
39+ tracker_status_set_and_signal (TRACKER_STATUS_IDLE);
40 item_queue_handlers_set_up (processor);
41 }
42 }
043
=== modified file 'debian/patches/series'
--- debian/patches/series 2009-04-13 15:33:10 +0000
+++ debian/patches/series 2009-04-22 19:16:57 +0000
@@ -2,4 +2,7 @@
203_dont_activate_indexing_and_watching.patch203_dont_activate_indexing_and_watching.patch
310-drop-bogus-version-info.patch310-drop-bogus-version-info.patch
411_drop_evolution_module.patch411_drop_evolution_module.patch
520_index_error_auto_reindex.patch
621_remove_all_indexes_on_reindex.patch
730_dont_index_removable_media.patch
599_autotools.patch899_autotools.patch
69
=== modified file 'debian/tracker.install'
--- debian/tracker.install 2009-04-14 11:28:25 +0000
+++ debian/tracker.install 2009-04-26 23:09:37 +0000
@@ -19,4 +19,3 @@
19debian/tracker.py usr/share/apport/package-hooks/19debian/tracker.py usr/share/apport/package-hooks/
20debian/30-tracker.conf etc/sysctl.d20debian/30-tracker.conf etc/sysctl.d
21debian/tmp/usr/share/dbus-1/services/org.freedesktop.Tracker.*.service21debian/tmp/usr/share/dbus-1/services/org.freedesktop.Tracker.*.service
22debian/tmp/usr/lib/evolution/2.26/plugins

Subscribers

People subscribed via source and target branches

to all changes: