Index: src/libtracker-data/tracker-data-update.c =================================================================== --- src/libtracker-data/tracker-data-update.c (revision 3075) +++ src/libtracker-data/tracker-data-update.c (working copy) @@ -825,6 +825,20 @@ } void +tracker_data_update_reset_volume (guint32 volume_id) +{ + TrackerDBInterface *iface; + + iface = tracker_db_manager_get_db_interface (TRACKER_DB_COMMON); + + tracker_db_interface_execute_procedure (iface, NULL, + "UpdateVolumeDisabledDate", + volume_id, + NULL); +} + + +void tracker_data_update_disable_volume (const gchar *udi) { TrackerDBInterface *iface; Index: src/libtracker-data/tracker-data-update.h =================================================================== --- src/libtracker-data/tracker-data-update.h (revision 3075) +++ src/libtracker-data/tracker-data-update.h (working copy) @@ -85,6 +85,7 @@ const gchar *mount_path); void tracker_data_update_disable_volume (const gchar *udi); void tracker_data_update_disable_all_volumes (void); +void tracker_data_update_reset_volume (guint32 volume_id); G_END_DECLS Index: src/trackerd/tracker-volume-cleanup.c =================================================================== --- src/trackerd/tracker-volume-cleanup.c (revision 3075) +++ src/trackerd/tracker-volume-cleanup.c (working copy) @@ -80,9 +80,11 @@ while (is_valid) { GValue value = { 0, }; + GValue idvalue = { 0, }; const gchar *mount_point_path; _tracker_db_result_set_get_value (result_set, 0, &value); + _tracker_db_result_set_get_value (result_set, 1, &idvalue); mount_point_path = g_value_get_string (&value); @@ -102,7 +104,10 @@ g_object_unref (file); } + tracker_data_update_reset_volume (g_value_get_uint (&idvalue)); + g_value_unset (&value); + g_value_unset (&idvalue); is_valid = tracker_db_result_set_iter_next (result_set); } Index: src/tracker-extract/tracker-main.c =================================================================== --- src/tracker-extract/tracker-main.c (revision 3075) +++ src/tracker-extract/tracker-main.c (working copy) @@ -45,12 +45,6 @@ #include "tracker-dbus.h" #include "tracker-extract.h" -/* Temporary hack for out of date kernels, also, this value may not be - * the same on all architectures, but it is for x86. - */ -#ifndef SCHED_IDLE -#define SCHED_IDLE 5 -#endif #define ABOUT \ "Tracker " PACKAGE_VERSION "\n" Index: data/db/sqlite-stored-procs.sql =================================================================== --- data/db/sqlite-stored-procs.sql (revision 3075) +++ data/db/sqlite-stored-procs.sql (working copy) @@ -128,13 +128,13 @@ GetVolumeID SELECT VolumeID FROM Volumes WHERE UDI = ?; GetVolumeByPath SELECT VolumeID FROM Volumes WHERE Enabled = 1 AND (? = MountPath OR ? LIKE (MountPath || '/%')); -GetVolumesToClean SELECT MountPath FROM Volumes WHERE DisabledDate < date('now', '-3 day'); +GetVolumesToClean SELECT MountPath, VolumeID FROM Volumes WHERE DisabledDate < date('now', '-3 day'); InsertVolume INSERT INTO Volumes (MountPath, UDI, Enabled, DisabledDate) VALUES (?, ?, 1, date('now')); EnableVolume UPDATE Volumes SET MountPath = ?, Enabled = 1 WHERE UDI = ?; DisableVolume UPDATE Volumes SET Enabled = 0, DisabledDate = date ('now') WHERE UDI = ?; DisableAllVolumes UPDATE Volumes SET Enabled = 0 WHERE VolumeID > 1; +UpdateVolumeDisabledDate UPDATE Volumes SET DisabledDate = date ('now') WHERE VolumeID = ?; - /* * Turtle importing */