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

Proposed by Chris Coulson on 2009-04-26
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 2009-04-26 Pending
Review via email: mp+5910@code.launchpad.net
To post a comment you must log in.
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
1=== modified file 'debian/changelog'
2--- debian/changelog 2009-04-14 11:44:38 +0000
3+++ debian/changelog 2009-04-26 23:09:37 +0000
4@@ -1,10 +1,19 @@
5 tracker (0.6.93-0ubuntu2) UNRELEASED; urgency=low
6
7- * debian/tracker.install:
8- - Install Evolution EPlugin so that Evolution indexing works
9- (LP: #360399).
10+ * debian/patches/20_index_error_auto_reindex.patch:
11+ - Automatically reindex if the index becomes corrupt as opposed
12+ to displaying a notification with reindex action, which requires
13+ user intervention and results in a confusing fallback notification.
14+ Reindexing is the only sane way to recover from a corrupt index
15+ anyway (LP: #361205).
16+ * debian/patches/21_remove_all_indexes_on_reindex.patch:
17+ - Ensure that all index files are removed when a reindex is
18+ requested.
19+ * debian/patches/30_dont_index_removeable_media.patch:
20+ - Don't start indexing when removeable media is inserted and
21+ indexing is disabled in the preferences (LP: #359207).
22
23- -- Chris Coulson <chrisccoulson@googlemail.com> Tue, 14 Apr 2009 12:13:43 +0100
24+ -- Chris Coulson <chrisccoulson@googlemail.com> Wed, 22 Apr 2009 20:13:41 +0100
25
26 tracker (0.6.93-0ubuntu1) jaunty; urgency=low
27
28
29=== added file 'debian/patches/20_index_error_auto_reindex.patch'
30--- debian/patches/20_index_error_auto_reindex.patch 1970-01-01 00:00:00 +0000
31+++ debian/patches/20_index_error_auto_reindex.patch 2009-04-17 14:24:09 +0000
32@@ -0,0 +1,187 @@
33+Index: tracker-0.6.93/src/tracker-applet/tracker-applet.c
34+===================================================================
35+--- tracker-0.6.93.orig/src/tracker-applet/tracker-applet.c 2009-04-17 14:18:21.000000000 +0100
36++++ tracker-0.6.93/src/tracker-applet/tracker-applet.c 2009-04-17 14:56:09.000000000 +0100
37+@@ -1061,6 +1061,25 @@
38+ }
39+
40+ static void
41++restart_tracker_actual (TrayIcon *icon)
42++{
43++ TrayIconPrivate *priv;
44++
45++ debug ("Attempting to restart tracker\n");
46++
47++ priv = TRAY_ICON_GET_PRIVATE (icon);
48++ priv->reindex = TRUE;
49++
50++ dbus_g_proxy_begin_call (priv->tracker->proxy,
51++ "Shutdown",
52++ NULL,
53++ NULL,
54++ NULL,
55++ G_TYPE_BOOLEAN,
56++ TRUE, G_TYPE_INVALID);
57++}
58++
59++static void
60+ restart_tracker (GtkDialog *dialog,
61+ gint response,
62+ TrayIcon *icon)
63+@@ -1068,57 +1087,64 @@
64+ gtk_widget_destroy (GTK_WIDGET (dialog));
65+
66+ if (response == GTK_RESPONSE_YES) {
67+- TrayIconPrivate *priv;
68+-
69+- debug ("Attempting to restart tracker\n");
70+-
71+- priv = TRAY_ICON_GET_PRIVATE (icon);
72+- priv->reindex = TRUE;
73+-
74+- dbus_g_proxy_begin_call (priv->tracker->proxy,
75+- "Shutdown",
76+- NULL,
77+- NULL,
78+- NULL,
79+- G_TYPE_BOOLEAN,
80+- TRUE, G_TYPE_INVALID);
81++ restart_tracker_actual (icon);
82+ }
83+ }
84+
85+ static void
86+ reindex (GtkMenuItem *item,
87+- TrayIcon *icon)
88++ TrayIcon *icon,
89++ gboolean no_confirm)
90+ {
91+ GtkWidget *dialog;
92+ gchar *primary;
93+ gchar *secondary;
94++
95++ if (!no_confirm)
96++ {
97++ primary = g_strdup (_("Re-index your system?"));
98++ secondary =
99++ g_strdup (_("Indexing can take a long time. "
100++ "Are you sure you want to re-index?"));
101++
102++ dialog = gtk_message_dialog_new (NULL,
103++ GTK_DIALOG_MODAL,
104++ GTK_MESSAGE_WARNING,
105++ GTK_BUTTONS_YES_NO,
106++ "%s",
107++ primary);
108++
109++ gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
110++ "%s",
111++ secondary);
112++
113++ g_free (primary);
114++ g_free (secondary);
115++
116++ gtk_window_set_title (GTK_WINDOW (dialog), "");
117++ gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
118++ gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14);
119++
120++ g_signal_connect (G_OBJECT (dialog), "response",
121++ G_CALLBACK (restart_tracker), icon);
122++ gtk_widget_show (dialog);
123++ } else {
124++ restart_tracker_actual (icon);
125++ }
126++}
127+
128+- primary = g_strdup (_("Re-index your system?"));
129+- secondary =
130+- g_strdup (_("Indexing can take a long time. "
131+- "Are you sure you want to re-index?"));
132+-
133+- dialog = gtk_message_dialog_new (NULL,
134+- GTK_DIALOG_MODAL,
135+- GTK_MESSAGE_WARNING,
136+- GTK_BUTTONS_YES_NO,
137+- "%s",
138+- primary);
139+-
140+- gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
141+- "%s",
142+- secondary);
143+-
144+- g_free (primary);
145+- g_free (secondary);
146+-
147+- gtk_window_set_title (GTK_WINDOW (dialog), "");
148+- gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
149+- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14);
150++static void
151++reindex_no_confirmation (GtkMenuItem *item,
152++ TrayIcon *icon)
153++{
154++ reindex (item, icon, TRUE);
155++}
156+
157+- g_signal_connect (G_OBJECT (dialog), "response",
158+- G_CALLBACK (restart_tracker), icon);
159+- gtk_widget_show (dialog);
160++static void
161++reindex_with_confirmation (GtkMenuItem *item,
162++ TrayIcon *icon)
163++{
164++ reindex (item, icon, FALSE);
165+ }
166+
167+ static void
168+@@ -1486,7 +1512,7 @@
169+ image = gtk_image_new_from_icon_name (GTK_STOCK_FIND,
170+ GTK_ICON_SIZE_MENU);
171+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
172+- g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (reindex),
173++ g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (reindex_with_confirmation),
174+ icon);
175+ gtk_menu_shell_append (GTK_MENU_SHELL (priv->menu), item);
176+
177+@@ -2088,14 +2114,6 @@
178+ }
179+
180+ static void
181+-error_notification_reindex_cb (NotifyNotification *notification,
182+- const gchar *action,
183+- gpointer user_data)
184+-{
185+- reindex (NULL, user_data);
186+-}
187+-
188+-static void
189+ error_notification_closed_cb (NotifyNotification *notification,
190+ gpointer user_data)
191+ {
192+@@ -2130,23 +2148,18 @@
193+ NULL,
194+ priv->icon);
195+
196+- notify_notification_set_timeout (error_notification, NOTIFY_EXPIRES_NEVER);
197+ notify_notification_set_urgency (error_notification, NOTIFY_URGENCY_CRITICAL);
198+
199+ g_signal_connect (error_notification, "closed",
200+ G_CALLBACK (error_notification_closed_cb), NULL);
201+
202+- if (requires_reindex) {
203+- notify_notification_add_action (error_notification,
204+- "reindex",
205+- _("Reindex all contents"),
206+- NOTIFY_ACTION_CALLBACK (error_notification_reindex_cb),
207+- icon, NULL);
208+- }
209+-
210+ notify_notification_show (error_notification, NULL);
211+
212+ g_free (msg);
213++
214++ if (requires_reindex) {
215++ reindex_no_confirmation (NULL, icon);
216++ }
217+ }
218+
219+ GType
220
221=== added file 'debian/patches/21_remove_all_indexes_on_reindex.patch'
222--- debian/patches/21_remove_all_indexes_on_reindex.patch 1970-01-01 00:00:00 +0000
223+++ debian/patches/21_remove_all_indexes_on_reindex.patch 2009-04-22 19:16:57 +0000
224@@ -0,0 +1,12 @@
225+Index: tracker-0.6.93/src/trackerd/tracker-main.c
226+===================================================================
227+--- tracker-0.6.93.orig/src/trackerd/tracker-main.c 2009-04-22 20:12:17.000000000 +0100
228++++ tracker-0.6.93/src/trackerd/tracker-main.c 2009-04-22 20:13:03.000000000 +0100
229+@@ -641,6 +641,7 @@
230+ /* If we are reindexing, just remove the databases */
231+ if (private->reindex_on_shutdown) {
232+ tracker_db_manager_remove_all ();
233++ tracker_db_index_manager_remove_all ();
234+ }
235+ }
236+
237
238=== added file 'debian/patches/30_dont_index_removable_media.patch'
239--- debian/patches/30_dont_index_removable_media.patch 1970-01-01 00:00:00 +0000
240+++ debian/patches/30_dont_index_removable_media.patch 2009-04-22 16:31:58 +0000
241@@ -0,0 +1,42 @@
242+# Don't start indexing when removable media is inserted and indexing is disabled in the preferences.
243+# Launchpad: https://bugs.launchpad.net/bugs/359207
244+# Bugzilla: https://bugs.edge.launchpad.net/ubuntu/+source/tracker/+bug/359207
245+# Commits: 4581372459a09fb2ce5030124265c61b11eb5f84 and 337c3ebfc5585534bf0a2129ec8589eea56b2840
246+Index: tracker-0.6.93/src/trackerd/tracker-processor.c
247+===================================================================
248+--- tracker-0.6.93.orig/src/trackerd/tracker-processor.c 2009-04-22 17:25:05.000000000 +0100
249++++ tracker-0.6.93/src/trackerd/tracker-processor.c 2009-04-22 17:26:35.000000000 +0100
250+@@ -857,7 +857,7 @@
251+ file = g_file_new_for_path (root);
252+ tracker_monitor_add (processor->private->monitor, module_name, file);
253+ g_object_unref (file);
254+-
255++
256+ tracker_crawler_special_paths_add (crawler, root);
257+
258+ break;
259+@@ -1031,6 +1031,13 @@
260+ const gchar *module_name;
261+ gboolean is_removable_media;
262+
263++ if (tracker_status_get_is_readonly ()) {
264++ /* Block any request to process
265++ * modules if indexing is not enabled
266++ */
267++ return;
268++ }
269++
270+ /* Don't recursively iterate the modules if this function is
271+ * called, check first.
272+ */
273+@@ -1784,6 +1791,10 @@
274+ processor->private->finished = TRUE;
275+ g_signal_emit (processor, signals[FINISHED], 0);
276+ } else {
277++ /* Set status to IDLE, so it isn't left to any other state
278++ * if there are no files to be sent to the indexer.
279++ */
280++ tracker_status_set_and_signal (TRACKER_STATUS_IDLE);
281+ item_queue_handlers_set_up (processor);
282+ }
283+ }
284
285=== modified file 'debian/patches/series'
286--- debian/patches/series 2009-04-13 15:33:10 +0000
287+++ debian/patches/series 2009-04-22 19:16:57 +0000
288@@ -2,4 +2,7 @@
289 03_dont_activate_indexing_and_watching.patch
290 10-drop-bogus-version-info.patch
291 11_drop_evolution_module.patch
292+20_index_error_auto_reindex.patch
293+21_remove_all_indexes_on_reindex.patch
294+30_dont_index_removable_media.patch
295 99_autotools.patch
296
297=== modified file 'debian/tracker.install'
298--- debian/tracker.install 2009-04-14 11:28:25 +0000
299+++ debian/tracker.install 2009-04-26 23:09:37 +0000
300@@ -19,4 +19,3 @@
301 debian/tracker.py usr/share/apport/package-hooks/
302 debian/30-tracker.conf etc/sysctl.d
303 debian/tmp/usr/share/dbus-1/services/org.freedesktop.Tracker.*.service
304-debian/tmp/usr/lib/evolution/2.26/plugins

Subscribers

People subscribed via source and target branches

to all changes: