diff --git a/PackageKit-zypp-dont-refresh-before-searching.patch b/PackageKit-zypp-dont-refresh-before-searching.patch new file mode 100644 index 0000000..0f321f1 --- /dev/null +++ b/PackageKit-zypp-dont-refresh-before-searching.patch @@ -0,0 +1,36 @@ +From 2ebbc222603f92769b60412c4592e3fb2d6c8d00 Mon Sep 17 00:00:00 2001 +From: Jonathan Kang +Date: Thu, 1 Sep 2022 10:15:15 +0800 +Subject: [PATCH] zypp: Don't refresh repos before searching + +Refreshing repos should be done by calling "refresh-cache", not inside +backend_find_packages_thread. + +This fixes the issue that GNOME Software calls multiple search-files +methods which takes very long time to finish. As most of the time was +spent refreshing repos multiple times. + +https://bugzilla.suse.com/show_bug.cgi?id=1202796 +--- + backends/zypp/pk-backend-zypp.cpp | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/backends/zypp/pk-backend-zypp.cpp b/backends/zypp/pk-backend-zypp.cpp +index 62adbb8be..c87972079 100644 +--- a/backends/zypp/pk-backend-zypp.cpp ++++ b/backends/zypp/pk-backend-zypp.cpp +@@ -3109,11 +3109,6 @@ backend_find_packages_thread (PkBackendJob *job, GVariant *params, gpointer user + return; + } + +- // refresh the repos before searching +- if (!zypp_refresh_cache (job, zypp, FALSE)) { +- return; +- } +- + search = values[0]; //Fixme - support the possible multiple values (logical OR search) + role = pk_backend_job_get_role(job); + +-- +2.37.1 + diff --git a/PackageKit.changes b/PackageKit.changes index a76efb8..db41e66 100644 --- a/PackageKit.changes +++ b/PackageKit.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Sep 2 01:16:56 UTC 2022 - Jonathan Kang + +- Add PackageKit-zypp-dont-refresh-before-searching.patch: + zypp: Don't refresh repos before searching + (gh#PackageKit/PackageKit/commit/58c7c0285, bsc#1199895). + ------------------------------------------------------------------- Wed Aug 3 03:27:36 UTC 2022 - Jonathan Kang diff --git a/PackageKit.spec b/PackageKit.spec index e844fd1..9327b78 100644 --- a/PackageKit.spec +++ b/PackageKit.spec @@ -66,6 +66,8 @@ Patch9: PackageKit-zypp-restore-pool-status-after-simulating-update.patc Patch10: PackageKit-zypp-fix-is-tumbleweed-check.patch # PATCH-FIX-UPSTREAM PackageKit-zypp-update-libzypp-dependency-version.patch gh#PackageKit/PackageKit/commit/58c7c0285, bsc#1199895 sckang@suse.com -- zypp: update libzypp dependency version Patch11: PackageKit-zypp-update-libzypp-dependency-version.patch +# PATCH-FIX-UPSTREAM PackageKit-zypp-dont-refresh-before-searching.patch gh#PackageKit/PackageKit/commit/7e700e217, bsc#1202796 sckang@suse.com -- zypp: Don't refresh repos before searching +Patch12: PackageKit-zypp-dont-refresh-before-searching.patch BuildRequires: fdupes BuildRequires: gcc-c++