summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMart Raudsepp <leio@gentoo.org>2024-05-03 23:25:33 +0300
committerMart Raudsepp <leio@gentoo.org>2024-05-03 23:34:40 +0300
commit785116472a3975dff6bc6d9337099bf58f698759 (patch)
tree1da31187cf202b749b63517a950745554ac674e2 /app-misc/tracker
parentnet-libs/nodejs: add 18.20.2 (diff)
downloadgentoo-785116472a3975dff6bc6d9337099bf58f698759.tar.gz
gentoo-785116472a3975dff6bc6d9337099bf58f698759.tar.bz2
gentoo-785116472a3975dff6bc6d9337099bf58f698759.zip
app-misc/tracker: fix regression from sqlite-3.45.3 behaviour change
Straight to stable because sqlite-3.45.3 was already stabilized early and thus tracker was broken on stable. Closes: https://bugs.gentoo.org/931015 Signed-off-by: Mart Raudsepp <leio@gentoo.org>
Diffstat (limited to 'app-misc/tracker')
-rw-r--r--app-misc/tracker/files/3.6.0-sqlite-3.45.3-compat.patch44
-rw-r--r--app-misc/tracker/tracker-3.6.0-r1.ebuild (renamed from app-misc/tracker/tracker-3.6.0.ebuild)1
2 files changed, 45 insertions, 0 deletions
diff --git a/app-misc/tracker/files/3.6.0-sqlite-3.45.3-compat.patch b/app-misc/tracker/files/3.6.0-sqlite-3.45.3-compat.patch
new file mode 100644
index 000000000000..72e37c83068c
--- /dev/null
+++ b/app-misc/tracker/files/3.6.0-sqlite-3.45.3-compat.patch
@@ -0,0 +1,44 @@
+From 0c576af6df5af2f1b8df9841fbb566fa52a4e382 Mon Sep 17 00:00:00 2001
+From: Carlos Garnacho <carlosg@gnome.org>
+Date: Thu, 18 Apr 2024 14:18:08 +0200
+Subject: [PATCH] core: Fix incompatibility introduced by SQLite 3.45.3
+
+For the umpteenth time, SQLite introduced behavioral changes that
+we need to adapt to. This time, version 3.45.3 "fixed" at
+https://github.com/sqlite/sqlite/commit/74851f66811854c772a9b2d0a13f1e9e82b69c25
+their SQLITE_ALLOW_ROWID_IN_VIEW build-time option which controls the
+behavior of views having an implicit ROWID column vs not.
+
+This broke our view used to proxy data to the content-less FTS5
+table, since the SELECT query it translates to used a naked reference to
+ROWID that is now deemed "ambiguous" by SQLite engine, this results
+in the following errors:
+
+Tracker:ERROR:../tests/core/tracker-ontology-test.c:231:test_query: assertion failed (error == NULL): ambiguous column name: ROWID (tracker-db-interface-error-quark, 0)
+
+We are actually referencing data inside the SELECT query, so fix this
+ambiguity by stating clearly the table/column that we are referring to
+within the SELECT query clause. This is backwards compatible with older
+versions of SQLite.
+
+Closes: https://gitlab.gnome.org/GNOME/tracker/-/issues/435
+---
+ src/libtracker-sparql/core/tracker-fts.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/libtracker-sparql/core/tracker-fts.c b/src/libtracker-sparql/core/tracker-fts.c
+index 1171dc11a8..99600820bd 100644
+--- a/src/libtracker-sparql/core/tracker-fts.c
++++ b/src/libtracker-sparql/core/tracker-fts.c
+@@ -112,7 +112,7 @@ tracker_fts_create_table (sqlite3 *db,
+
+ g_string_append_printf (from, "WHERE COALESCE (%s NULL) IS NOT NULL ",
+ column_names->str);
+- g_string_append (from, "GROUP BY ROWID");
++ g_string_append (from, "GROUP BY \"rdfs:Resource\".ID");
+ g_string_append (str, from->str);
+ g_string_free (from, TRUE);
+
+--
+GitLab
+
diff --git a/app-misc/tracker/tracker-3.6.0.ebuild b/app-misc/tracker/tracker-3.6.0-r1.ebuild
index 3ce100022d75..d45a9117cedf 100644
--- a/app-misc/tracker/tracker-3.6.0.ebuild
+++ b/app-misc/tracker/tracker-3.6.0-r1.ebuild
@@ -47,6 +47,7 @@ PDEPEND="miners? ( >=app-misc/tracker-miners-3.6_rc )"
PATCHES=(
"${FILESDIR}"/3.6.0-configure-c99.patch
+ "${FILESDIR}"/${PV}-sqlite-3.45.3-compat.patch
)
python_check_deps() {