import nautilus-3.28.1-14.el8

This commit is contained in:
CentOS Sources 2020-07-14 01:40:48 +00:00 committed by Andrew Lukoshko
parent 4489ed9b78
commit 17bbcd9947
3 changed files with 94 additions and 1 deletions

View File

@ -0,0 +1,33 @@
From 33fafad8430ac32a750fd3315d507482c8028c15 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ant=C3=B3nio=20Fernandes?= <antoniof@gnome.org>
Date: Fri, 29 May 2020 13:16:11 +0100
Subject: [PATCH] search-engine-tracker: Expand macro as string
We have changed the FILENAME_RANK constant from being used as a format
string argument to be concatenated as a string during compilation, as
detailed in 7f00ede9b410e88106cef34c634cb46e46015e37
However, I have forgotten to quote the constant, which otherwise cannot
be treated as a string to concatenate.
Fix that now.
---
src/nautilus-search-engine-tracker.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/nautilus-search-engine-tracker.c b/src/nautilus-search-engine-tracker.c
index 571467a25..13470a62e 100644
--- a/src/nautilus-search-engine-tracker.c
+++ b/src/nautilus-search-engine-tracker.c
@@ -290,7 +290,7 @@ search_finished_idle (gpointer user_data)
* not used). The value was determined experimentally. I am convinced that
* fts:rank is currently always set to 5.0 in case of filename match.
*/
-#define FILENAME_RANK 5.0
+#define FILENAME_RANK "5.0"
static void
nautilus_search_engine_tracker_start (NautilusSearchProvider *provider)
--
2.26.2

View File

@ -0,0 +1,53 @@
From 7018cdcaa9954271cd82ba1c2620ecdfea176fae Mon Sep 17 00:00:00 2001
From: Cristiano Nunes <cfgnunes@gmail.com>
Date: Tue, 7 Apr 2020 14:47:41 +0000
Subject: [PATCH] search-engine-tracker: Fix broken query under some locales
We set a 5.0 rank for filename matches in the SPARQL query as a float
argument in a format string.
However, the floats in format strings are translated with the decimal
separator from the locale. This means in some locales the rank has a
comma instead of a dot, which results in a query error. In turn, this
effectively broke the shell search provider.
Instead of using a format specifier and passing the value as an
argument, we should just use compile-time concatenation to insert '5.0'
in the query unmodified.
Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1412 and #1437
Cherry-picked from 7f00ede9b410e88106cef34c634cb46e46015e37
---
src/nautilus-search-engine-tracker.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/nautilus-search-engine-tracker.c b/src/nautilus-search-engine-tracker.c
index 32b6039a9..571467a25 100644
--- a/src/nautilus-search-engine-tracker.c
+++ b/src/nautilus-search-engine-tracker.c
@@ -287,7 +287,7 @@ search_finished_idle (gpointer user_data)
}
/* This is used to compensate rank if fts:rank is not set (resp. fts:match is
- * not used). The value was determined experimentally. I am conviced that
+ * not used). The value was determined experimentally. I am convinced that
* fts:rank is currently always set to 5.0 in case of filename match.
*/
#define FILENAME_RANK 5.0
@@ -372,10 +372,9 @@ nautilus_search_engine_tracker_start (NautilusSearchProvider *provider)
" {"
" ?urn nfo:fileName ?filename ."
" FILTER(fn:contains(fn:lower-case(?filename), '%s')) ."
- " BIND(%f AS ?rank2) ."
+ " BIND(" FILENAME_RANK " AS ?rank2) ."
" }",
- search_text,
- FILENAME_RANK);
+ search_text);
g_string_append_printf (sparql, " . FILTER( ");
--
2.26.2

View File

@ -8,7 +8,7 @@
Name: nautilus
Version: 3.28.1
Release: 13%{?dist}
Release: 14%{?dist}
Summary: File manager for GNOME
License: GPLv3+
@ -62,6 +62,10 @@ Patch30: file-operations-Honor-umask-when-creating-new-files.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1816070
Patch31: nautilus-mime-actions.c-No-Application-Installed-dia.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1847061
Patch32: search-engine-tracker-Fix-broken-query-under-some-lo.patch
Patch33: search-engine-tracker-Expand-macro-as-string.patch
BuildRequires: gtk-doc
BuildRequires: meson
BuildRequires: gcc
@ -174,6 +178,9 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/*.desktop
%{_datadir}/gir-1.0/*.gir
%changelog
* Fri Jun 19 2020 Ondrej Holy <oholy@redhat.com> - 3.28.1-14
- Fix broken tracker query under certain locales (rhbz#1847061)
* Fri Apr 17 2020 Ondrej Holy <oholy@redhat.com> - 3.28.1-13
- Clear selection if any files don't match the pattern (rhbz#1207179)
- Fix endless content size calculations (rhbz#1566027)