Fix "too many results returned" error after distro upgrades
It turns out we had an error path that caused gnome-software to error out when the offline update results file listed more than 500 packages, which is an easy limit to cross for distro upgrades. This backports an upstream patch that fixes this. https://bugzilla.redhat.com/show_bug.cgi?id=1496489
This commit is contained in:
parent
254a769162
commit
5a6359880c
41
0001-Don-t-error-out-for-over-500-results.patch
Normal file
41
0001-Don-t-error-out-for-over-500-results.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
From 993faac2759316fde53a61109fc62fd271f315c2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kalev Lember <klember@redhat.com>
|
||||||
|
Date: Wed, 25 Oct 2017 12:43:02 +0200
|
||||||
|
Subject: [PATCH] Don't error out for over 500 results
|
||||||
|
|
||||||
|
We can legitimately get more than 500 when updating a large number of packages
|
||||||
|
and then showing the offline update results.
|
||||||
|
|
||||||
|
This commit drops the failure path for >500 results; for cases where
|
||||||
|
performance is critical (search), the results are already truncated in
|
||||||
|
gs_plugin_loader_job_sorted_truncation_again() and for other cases we
|
||||||
|
can just keep on going.
|
||||||
|
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=1496489
|
||||||
|
---
|
||||||
|
lib/gs-plugin-loader.c | 9 ---------
|
||||||
|
1 file changed, 9 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
|
||||||
|
index bf36d627..ff12113b 100644
|
||||||
|
--- a/lib/gs-plugin-loader.c
|
||||||
|
+++ b/lib/gs-plugin-loader.c
|
||||||
|
@@ -3290,15 +3290,6 @@ gs_plugin_loader_process_thread_cb (GTask *task,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- /* too many */
|
||||||
|
- if (gs_app_list_length (list) > 500) {
|
||||||
|
- g_task_return_new_error (task,
|
||||||
|
- GS_PLUGIN_ERROR,
|
||||||
|
- GS_PLUGIN_ERROR_NOT_SUPPORTED,
|
||||||
|
- "too many results returned");
|
||||||
|
- return;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
/* filter duplicates with priority, taking into account the source name
|
||||||
|
* & version, so we combine available updates with the installed app */
|
||||||
|
gs_app_list_filter (list, gs_plugin_loader_app_set_prio, plugin_loader);
|
||||||
|
--
|
||||||
|
2.14.2
|
||||||
|
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
Name: gnome-software
|
Name: gnome-software
|
||||||
Version: 3.26.1
|
Version: 3.26.1
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
Summary: A software center for GNOME
|
Summary: A software center for GNOME
|
||||||
|
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
@ -23,6 +23,7 @@ Source0: https://download.gnome.org/sources/gnome-software/3.26/%{name}-%{vers
|
|||||||
|
|
||||||
# Backported from upstream
|
# Backported from upstream
|
||||||
Patch0: 0001-flatpak-Set-the-correct-origin-when-installing-a-fla.patch
|
Patch0: 0001-flatpak-Set-the-correct-origin-when-installing-a-fla.patch
|
||||||
|
Patch1: 0001-Don-t-error-out-for-over-500-results.patch
|
||||||
|
|
||||||
BuildRequires: gettext
|
BuildRequires: gettext
|
||||||
BuildRequires: libxslt
|
BuildRequires: libxslt
|
||||||
@ -243,6 +244,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
|
|||||||
%{_mandir}/man1/gnome-software-editor.1*
|
%{_mandir}/man1/gnome-software-editor.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Oct 25 2017 Kalev Lember <klember@redhat.com> - 3.26.1-4
|
||||||
|
- Fix "too many results returned" error after distro upgrades (#1496489)
|
||||||
|
|
||||||
* Tue Oct 10 2017 Kalev Lember <klember@redhat.com> - 3.26.1-3
|
* Tue Oct 10 2017 Kalev Lember <klember@redhat.com> - 3.26.1-3
|
||||||
- Backport a flatpakref installation fix
|
- Backport a flatpakref installation fix
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user