commit: 785116472a3975dff6bc6d9337099bf58f698759 Author: Mart Raudsepp <leio <AT> gentoo <DOT> org> AuthorDate: Fri May 3 20:25:33 2024 +0000 Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org> CommitDate: Fri May 3 20:34:40 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78511647
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 <AT> gentoo.org> .../tracker/files/3.6.0-sqlite-3.45.3-compat.patch | 44 ++++++++++++++++++++++ ...racker-3.6.0.ebuild => tracker-3.6.0-r1.ebuild} | 1 + 2 files changed, 45 insertions(+) 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 <[email protected]> +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 similarity index 98% rename from app-misc/tracker/tracker-3.6.0.ebuild rename to 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() {
