Accepting request 986988 from GNOME:Factory
OBS-URL: https://build.opensuse.org/request/show/986988 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/tracker?expand=0&rev=148
This commit is contained in:
commit
1d5e9edff6
46
tracker-do-not-rebuild-non-existing-FTS-tables.patch
Normal file
46
tracker-do-not-rebuild-non-existing-FTS-tables.patch
Normal file
@ -0,0 +1,46 @@
|
||||
diff --git a/src/libtracker-sparql/core/tracker-data-manager.c b/src/libtracker-sparql/core/tracker-data-manager.c
|
||||
index 2a29008b88a362cfa84762b2620739d69dd7c918..33decd3e28ca9856db017feaa216ce70dcb4d439 100644
|
||||
--- a/src/libtracker-data/tracker-data-manager.c
|
||||
+++ b/src/libtracker-data/tracker-data-manager.c
|
||||
@@ -3866,20 +3866,34 @@ rebuild_fts_tokens (TrackerDataManager *manager,
|
||||
TrackerDBInterface *iface,
|
||||
GError **error)
|
||||
{
|
||||
+ TrackerProperty **properties;
|
||||
GHashTableIter iter;
|
||||
gchar *graph;
|
||||
+ gboolean has_fts = FALSE;
|
||||
+ guint len, i;
|
||||
|
||||
- g_debug ("Rebuilding FTS tokens, this may take a moment...");
|
||||
- if (!tracker_db_interface_sqlite_fts_rebuild_tokens (iface, "main", error))
|
||||
- return FALSE;
|
||||
+ properties = tracker_ontologies_get_properties (manager->ontologies, &len);
|
||||
|
||||
- g_hash_table_iter_init (&iter, manager->graphs);
|
||||
- while (g_hash_table_iter_next (&iter, (gpointer*) &graph, NULL)) {
|
||||
- if (!tracker_db_interface_sqlite_fts_rebuild_tokens (iface, graph, error))
|
||||
+ for (i = 0; i < len; i++) {
|
||||
+ has_fts |= tracker_property_get_fulltext_indexed (properties[i]);
|
||||
+ if (has_fts)
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (has_fts) {
|
||||
+ g_debug ("Rebuilding FTS tokens, this may take a moment...");
|
||||
+ if (!tracker_db_interface_sqlite_fts_rebuild_tokens (iface, "main", error))
|
||||
return FALSE;
|
||||
+
|
||||
+ g_hash_table_iter_init (&iter, manager->graphs);
|
||||
+ while (g_hash_table_iter_next (&iter, (gpointer*) &graph, NULL)) {
|
||||
+ if (!tracker_db_interface_sqlite_fts_rebuild_tokens (iface, graph, error))
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
+ g_debug ("FTS tokens rebuilt");
|
||||
}
|
||||
|
||||
- g_debug ("FTS tokens rebuilt");
|
||||
/* Update the stamp file */
|
||||
tracker_db_manager_tokenizer_update (manager->db_manager);
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 6 07:49:28 UTC 2022 - Alynx Zhou <alynx.zhou@suse.com>
|
||||
|
||||
- Add tracker-do-not-rebuild-non-existing-FTS-tables.patch: Prevent
|
||||
SQL logic error when using tag manager of nautilus. (bsc#1201246,
|
||||
glgo#GNOME/tracker!515)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 1 09:00:30 UTC 2022 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
|
@ -28,6 +28,8 @@ License: GPL-2.0-or-later
|
||||
Group: Productivity/Other
|
||||
URL: https://wiki.gnome.org/Projects/Tracker
|
||||
Source0: https://download.gnome.org/sources/tracker/3.3/%{name}-%{version}.tar.xz
|
||||
# PATCH-FIX-UPSTREAM tracker-do-not-rebuild-non-existing-FTS-tables.patch bsc#1201246 glgo#GNOME/tracker!515 alynx.zhou@suse.com -- Prevent rebuilding non-existing FTS tables
|
||||
Patch0: tracker-do-not-rebuild-non-existing-FTS-tables.patch
|
||||
|
||||
BuildRequires: asciidoc
|
||||
BuildRequires: fdupes
|
||||
|
Loading…
Reference in New Issue
Block a user