[arch-commits] Commit in tracker3/trunk (353.patch PKGBUILD)
Jan Steffens
heftig at archlinux.org
Thu Dec 10 12:08:20 UTC 2020
Date: Thursday, December 10, 2020 @ 12:08:19
Author: heftig
Revision: 403234
3.0.2-1
Added:
tracker3/trunk/353.patch
Modified:
tracker3/trunk/PKGBUILD
-----------+
353.patch | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
PKGBUILD | 18 ++++++++++++------
2 files changed, 63 insertions(+), 6 deletions(-)
Added: 353.patch
===================================================================
--- 353.patch (rev 0)
+++ 353.patch 2020-12-10 12:08:19 UTC (rev 403234)
@@ -0,0 +1,51 @@
+From 040e22d005985a19a0dc435a7631f91700804ce4 Mon Sep 17 00:00:00 2001
+From: Carlos Garnacho <carlosg at gnome.org>
+Date: Thu, 10 Dec 2020 03:55:08 +0100
+Subject: [PATCH] libtracker-data: Avoid deletion of empty rows in FTS table
+
+Starting with SQLite 3.34.0, this turns into a consistency error. Ensure
+rows being deleted have actually some content before proceeding to deletion,
+and ensure we don't process individual properties one by one in the course
+of a whole rdfs:Resource deletion.
+
+Fixes: https://bugs.archlinux.org/task/68903
+---
+ src/libtracker-data/tracker-data-update.c | 2 ++
+ src/libtracker-data/tracker-db-interface-sqlite.c | 5 +++--
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
+index e97006631..cb2f39eff 100644
+--- a/src/libtracker-data/tracker-data-update.c
++++ b/src/libtracker-data/tracker-data-update.c
+@@ -1902,6 +1902,8 @@ cache_delete_resource_type_full (TrackerData *data,
+ if (strcmp (tracker_class_get_uri (class), TRACKER_PREFIX_RDFS "Resource") == 0 &&
+ g_hash_table_size (data->resource_buffer->tables) == 0) {
+ tracker_db_interface_sqlite_fts_delete_id (iface, database, data->resource_buffer->id);
++ data->resource_buffer->fts_updated = TRUE;
++
+ /* skip subclass query when deleting whole resource
+ to improve performance */
+
+diff --git a/src/libtracker-data/tracker-db-interface-sqlite.c b/src/libtracker-data/tracker-db-interface-sqlite.c
+index 260b81d87..f5e91de29 100644
+--- a/src/libtracker-data/tracker-db-interface-sqlite.c
++++ b/src/libtracker-data/tracker-db-interface-sqlite.c
+@@ -2315,11 +2315,12 @@ tracker_db_interface_sqlite_fts_create_delete_all_query (TrackerDBInterface *db_
+ g_string_append_printf (insert_str,
+ "INSERT INTO \"%s\".fts5 (fts5, rowid %s) "
+ "SELECT 'delete', rowid %s FROM \"%s\".fts_view "
+- "WHERE rowid = ?",
++ "WHERE rowid = ? AND COALESCE(NULL %s) IS NOT NULL",
+ database,
+ db_interface->fts_properties,
+ db_interface->fts_properties,
+- database);
++ database,
++ db_interface->fts_properties);
+ return g_string_free (insert_str, FALSE);
+ }
+
+--
+GitLab
+
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-12-10 12:04:05 UTC (rev 403233)
+++ PKGBUILD 2020-12-10 12:08:19 UTC (rev 403234)
@@ -3,7 +3,7 @@
# Contributor: Alexander Fehr <pizzapunk gmail com>
pkgname=tracker3
-pkgver=3.0.1
+pkgver=3.0.2
pkgrel=1
pkgdesc="Desktop-neutral user information store, search tool and indexer"
url="https://wiki.gnome.org/Projects/Tracker"
@@ -16,9 +16,11 @@
checkdepends=(python-gobject python-dbus)
provides=(libtracker-sparql-3.0.so)
groups=(gnome)
-_commit=db1b17576f5e1edc4f145a73a9c873d453717f81 # tags/3.0.1^0
-source=("git+https://gitlab.gnome.org/GNOME/tracker.git#commit=$_commit")
-sha256sums=('SKIP')
+_commit=7324a45d8f5f2c221e9cdc96f8d28ffe32598ef0 # tags/3.0.2^0
+source=("git+https://gitlab.gnome.org/GNOME/tracker.git#commit=$_commit"
+ 353.patch)
+sha256sums=('SKIP'
+ '1445d235392de75c65ab28a0e358056c8ce7df9127f6e146cb3e2a4879c09f3d')
pkgver() {
cd tracker
@@ -27,15 +29,19 @@
prepare() {
cd tracker
+
+ # https://gitlab.gnome.org/GNOME/tracker/-/merge_requests/353
+ # https://bugs.archlinux.org/task/68903
+ git apply -3 ../353.patch
}
build() {
- arch-meson tracker build
+ arch-meson tracker build --buildtype debug
meson compile -C build
}
check() {
- dbus-run-session meson test -C build --print-errorlogs -t 3
+ TRACKER_DEBUG=sqlite,sql-statements dbus-run-session meson test -C build --print-errorlogs -t 3
}
package() {
More information about the arch-commits
mailing list