Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-cdr/brasero/files/
Date: Wed, 02 Feb 2022 19:29:44
Message-Id: 1643830167.76cee2b212b28bdc3b5fa91d65487f638c639e26.mattst88@gentoo
1 commit: 76cee2b212b28bdc3b5fa91d65487f638c639e26
2 Author: Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
3 AuthorDate: Mon Jan 31 22:13:55 2022 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 2 19:29:27 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76cee2b2
7
8 app-cdr/brasero: remove unused patch(es)
9
10 Closes: https://github.com/gentoo/gentoo/pull/24037
11 Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
12 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
13
14 .../brasero/files/brasero-3.12.2-tracker3.patch | 240 ---------------------
15 1 file changed, 240 deletions(-)
16
17 diff --git a/app-cdr/brasero/files/brasero-3.12.2-tracker3.patch b/app-cdr/brasero/files/brasero-3.12.2-tracker3.patch
18 deleted file mode 100644
19 index 7a98f336cc14..000000000000
20 --- a/app-cdr/brasero/files/brasero-3.12.2-tracker3.patch
21 +++ /dev/null
22 @@ -1,240 +0,0 @@
23 -From ca0d487aac3b9cf21e520a00b94cb3eaf833b9a3 Mon Sep 17 00:00:00 2001
24 -From: Carlos Garnacho <carlosg@×××××.org>
25 -Date: Thu, 24 Dec 2020 12:19:49 +0100
26 -Subject: [PATCH 1/5] Obtain TrackerSparqlConnection in a single point
27 -
28 -The is_available vmethod tries to create a connection if it's not
29 -there. But the BraseroSearchTracker initialization already tries to
30 -obtain the SPARQL connection. Let this method return wether
31 -initialiation was successful.
32 ----
33 - src/brasero-search-tracker.c | 6 ------
34 - 1 file changed, 6 deletions(-)
35 -
36 -diff --git a/src/brasero-search-tracker.c b/src/brasero-search-tracker.c
37 -index fe7be2bd..f8c29c0d 100644
38 ---- a/src/brasero-search-tracker.c
39 -+++ b/src/brasero-search-tracker.c
40 -@@ -56,12 +56,6 @@ brasero_search_tracker_is_available (BraseroSearchEngine *engine)
41 - BraseroSearchTrackerPrivate *priv;
42 -
43 - priv = BRASERO_SEARCH_TRACKER_PRIVATE (engine);
44 -- GError *error = NULL;
45 -- if (priv->connection)
46 -- return TRUE;
47 --
48 -- priv->cancellable = g_cancellable_new ();
49 -- priv->connection = tracker_sparql_connection_get (priv->cancellable, &error);
50 - return (priv->connection != NULL);
51 - }
52 -
53 ---
54 -GitLab
55 -
56 -
57 -From c0dace005ec34b345845aacd1f929fd618b199af Mon Sep 17 00:00:00 2001
58 -From: Carlos Garnacho <carlosg@×××××.org>
59 -Date: Thu, 24 Dec 2020 12:37:13 +0100
60 -Subject: [PATCH 2/5] Fix ORDER BY clauses in Tracker search
61 -
62 -The ?urn variable is not defined anywhere else in the query, so
63 -ordering is left undefined. Access the url/filename properly here.
64 ----
65 - src/brasero-search-tracker.c | 2 +-
66 - 1 file changed, 1 insertion(+), 1 deletion(-)
67 -
68 -diff --git a/src/brasero-search-tracker.c b/src/brasero-search-tracker.c
69 -index f8c29c0d..94085070 100644
70 ---- a/src/brasero-search-tracker.c
71 -+++ b/src/brasero-search-tracker.c
72 -@@ -307,7 +307,7 @@ brasero_search_tracker_query_start_real (BraseroSearchEngine *search,
73 - g_string_append (query, ")");
74 -
75 - g_string_append (query,
76 -- "} ORDER BY DESC(nie:url(?urn)) DESC(nfo:fileName(?urn))");
77 -+ "} ORDER BY DESC(?url) DESC(nfo:fileName(?file))");
78 -
79 - tracker_sparql_connection_query_async (priv->connection,
80 - query->str,
81 ---
82 -GitLab
83 -
84 -
85 -From f7181445bf9c88b7fab1bb5237d602b491694a9e Mon Sep 17 00:00:00 2001
86 -From: Carlos Garnacho <carlosg@×××××.org>
87 -Date: Thu, 24 Dec 2020 13:04:03 +0100
88 -Subject: [PATCH 3/5] Only use fts:rank with FTS searches
89 -
90 -This fixes two things:
91 -- The use of fts:match depends on priv->keywords being set, but
92 - fts:rank() has undefined behavior if fts:match is not present.
93 - Its value is returned in the cursor, but fortunately unused,
94 - so it can go away.
95 -
96 -- Fixes "garbage" being added at the end of the query, concretely
97 - ") } ORDER BY ... " is appended at the supposed end of the query
98 - string. Older SPARQL parser implementations would allow garbage
99 - at the end of its parsing state, I suspect "LIMIT 0 OFFSET 10000"
100 - was just a mean to push it to that state that it'd allow the
101 - remaining string, so that is gone too.
102 ----
103 - src/brasero-search-tracker.c | 21 +++++++++------------
104 - 1 file changed, 9 insertions(+), 12 deletions(-)
105 -
106 -diff --git a/src/brasero-search-tracker.c b/src/brasero-search-tracker.c
107 -index 94085070..ae1d388a 100644
108 ---- a/src/brasero-search-tracker.c
109 -+++ b/src/brasero-search-tracker.c
110 -@@ -234,7 +234,7 @@ brasero_search_tracker_query_start_real (BraseroSearchEngine *search,
111 -
112 - priv = BRASERO_SEARCH_TRACKER_PRIVATE (search);
113 -
114 -- query = g_string_new ("SELECT ?file ?url ?mime fts:rank(?file) " /* Which variables should be returned */
115 -+ query = g_string_new ("SELECT ?file ?url ?mime " /* Which variables should be returned */
116 - "WHERE {" /* Start defining the search and its scope */
117 - " ?file a nfo:FileDataObject . " /* File must be a file (not a stream, ...) */
118 - " ?file nie:url ?url . " /* Get the url of the file */
119 -@@ -293,21 +293,18 @@ brasero_search_tracker_query_start_real (BraseroSearchEngine *search,
120 - " ) ");
121 - }
122 -
123 -- if (priv->keywords)
124 -+ if (priv->keywords) {
125 - g_string_append_printf (query,
126 - " ?file fts:match \"%s\" ", /* File must match possible keywords */
127 - priv->keywords);
128 -
129 -- g_string_append (query,
130 -- " } "
131 -- "ORDER BY ASC(fts:rank(?file)) "
132 -- "OFFSET 0 "
133 -- "LIMIT 10000");
134 --
135 -- g_string_append (query, ")");
136 --
137 -- g_string_append (query,
138 -- "} ORDER BY DESC(?url) DESC(nfo:fileName(?file))");
139 -+ g_string_append (query,
140 -+ " } "
141 -+ "ORDER BY ASC(fts:rank(?file))");
142 -+ } else {
143 -+ g_string_append (query,
144 -+ "} ORDER BY DESC(?url) DESC(nfo:fileName(?file))");
145 -+ }
146 -
147 - tracker_sparql_connection_query_async (priv->connection,
148 - query->str,
149 ---
150 -GitLab
151 -
152 -
153 -From ede7758e2fae487d57be641a120c4c02bfd249f1 Mon Sep 17 00:00:00 2001
154 -From: Carlos Garnacho <carlosg@×××××.org>
155 -Date: Thu, 24 Dec 2020 13:15:21 +0100
156 -Subject: [PATCH 4/5] Observe nfo:FileDataObject/nie:InformationElement split
157 -
158 -These resources are interpreted differently in Tracker 3.0 compared
159 -to older versions, the newer version makes those 2 different resources
160 -(one representing the "file", other the "content) that relate to each
161 -other. In older tracker versions, these 2 aspects were conflated in
162 -a single resource.
163 -
164 -The query is implicitly crossing that barrier, so make it explicit.
165 -With this change, the query may run with either version.
166 ----
167 - src/brasero-search-tracker.c | 5 +++--
168 - 1 file changed, 3 insertions(+), 2 deletions(-)
169 -
170 -diff --git a/src/brasero-search-tracker.c b/src/brasero-search-tracker.c
171 -index ae1d388a..9aa06289 100644
172 ---- a/src/brasero-search-tracker.c
173 -+++ b/src/brasero-search-tracker.c
174 -@@ -238,7 +238,8 @@ brasero_search_tracker_query_start_real (BraseroSearchEngine *search,
175 - "WHERE {" /* Start defining the search and its scope */
176 - " ?file a nfo:FileDataObject . " /* File must be a file (not a stream, ...) */
177 - " ?file nie:url ?url . " /* Get the url of the file */
178 -- " ?file nie:mimeType ?mime . "); /* Get its mime */
179 -+ " ?file nie:mimeType ?mime . " /* Get its mime */
180 -+ " ?content nie:isStoredAs ?file . "); /* Get the resource representing the content */
181 -
182 - if (priv->mimes) {
183 - int i;
184 -@@ -259,7 +260,7 @@ brasero_search_tracker_query_start_real (BraseroSearchEngine *search,
185 - gboolean param_added = FALSE;
186 -
187 - g_string_append (query,
188 -- " ?file a ?type . "
189 -+ " ?content a ?type . "
190 - " FILTER ( ");
191 -
192 - if (priv->scope & BRASERO_SEARCH_SCOPE_MUSIC) {
193 ---
194 -GitLab
195 -
196 -
197 -From 05589be7da3a0dfb00617df049d129abba703c36 Mon Sep 17 00:00:00 2001
198 -From: Carlos Garnacho <carlosg@×××××.org>
199 -Date: Thu, 24 Dec 2020 13:22:43 +0100
200 -Subject: [PATCH 5/5] Support Tracker 3.0
201 -
202 -Add the compile-time checks, and add the minimal code catering for
203 -the API changes. In 3.0 connections are no longer singletons.
204 ----
205 - configure.ac | 6 +++++-
206 - src/brasero-search-tracker.c | 8 ++++++++
207 - 2 files changed, 13 insertions(+), 1 deletion(-)
208 -
209 -diff --git a/configure.ac b/configure.ac
210 -index d0c7a870..96afc551 100644
211 ---- a/configure.ac
212 -+++ b/configure.ac
213 -@@ -388,7 +388,7 @@ AC_ARG_ENABLE(search,
214 - if test x"$enable_search" != "xno"; then
215 - # Try to figure out the tracker API version to use
216 - tracker_api="0.10"
217 -- m4_foreach([VERSION], [[0.10], [0.12], [0.14], [0.16], [0.18], [1.0], [2.0]],
218 -+ m4_foreach([VERSION], [[0.10], [0.12], [0.14], [0.16], [0.18], [1.0], [2.0], [3.0]],
219 - [PKG_CHECK_EXISTS([tracker-sparql-VERSION >= $TRACKER_REQUIRED],
220 - [tracker_api="VERSION"])
221 - ])
222 -@@ -408,6 +408,10 @@ if test x"$enable_search" = "xyes"; then
223 - AC_SUBST(BRASERO_SEARCH_LIBS)
224 - build_tracker="yes"
225 - build_search="yes"
226 -+
227 -+ if test x"$tracker_api" = x"3.0"; then
228 -+ AC_DEFINE(HAVE_TRACKER3, 1, [define if tracker3 is available])
229 -+ fi
230 - else
231 - build_search="no"
232 - fi
233 -diff --git a/src/brasero-search-tracker.c b/src/brasero-search-tracker.c
234 -index 9aa06289..40c5f1ac 100644
235 ---- a/src/brasero-search-tracker.c
236 -+++ b/src/brasero-search-tracker.c
237 -@@ -17,6 +17,8 @@
238 - * with this program. If not, see <http://www.gnu.org/licenses/>.
239 - */
240 -
241 -+#include "config.h"
242 -+
243 - #include <stdlib.h>
244 -
245 - #include <libtracker-sparql/tracker-sparql.h>
246 -@@ -444,7 +446,13 @@ brasero_search_tracker_init (BraseroSearchTracker *object)
247 -
248 - priv = BRASERO_SEARCH_TRACKER_PRIVATE (object);
249 - priv->cancellable = g_cancellable_new ();
250 -+
251 -+#ifdef HAVE_TRACKER3
252 -+ priv->connection = tracker_sparql_connection_bus_new ("org.freedesktop.Tracker3.Miner.Files",
253 -+ NULL, NULL, &error);
254 -+#else
255 - priv->connection = tracker_sparql_connection_get (priv->cancellable, &error);
256 -+#endif
257 -
258 - if (error) {
259 - g_warning ("Could not establish a connection to Tracker: %s", error->message);
260 ---
261 -GitLab
262 -