Do not trigger an inotity event when the AppStream XML data is unchanged

This commit is contained in:
Richard Hughes 2019-07-19 16:35:13 +01:00
parent 0ef1e9fdad
commit 1dedfa0271
2 changed files with 41 additions and 1 deletions

View File

@ -0,0 +1,33 @@
From f3398f8e48203246d6346b5c7c4ec5ea065181e6 Mon Sep 17 00:00:00 2001
From: Richard Hughes <richard@hughsie.com>
Date: Fri, 19 Jul 2019 15:01:49 +0100
Subject: [PATCH] Do not trigger an inotity event when the AppStream XML data
is unchanged
We already call dnf_utils_refresh_repo_appstream() on startup, but only as
required. Remove the unconditional copy to speed up gnome-software startup.
---
backends/dnf/pk-backend-dnf.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/backends/dnf/pk-backend-dnf.c b/backends/dnf/pk-backend-dnf.c
index 779896c2d..503a6eb0a 100644
--- a/backends/dnf/pk-backend-dnf.c
+++ b/backends/dnf/pk-backend-dnf.c
@@ -565,13 +565,6 @@ dnf_utils_add_remote (PkBackendJob *job,
if (!ret)
return FALSE;
- /* update the AppStream copies in /var */
- for (guint i = 0; i < repos->len; i++) {
- DnfRepo *repo = g_ptr_array_index (repos, i);
- if (!dnf_utils_refresh_repo_appstream (repo, error))
- return FALSE;
- }
-
/* done */
if (!dnf_state_done (state, error))
return FALSE;
--
2.21.0

View File

@ -14,7 +14,7 @@
Summary: Package management service
Name: PackageKit
Version: 1.1.12
Release: 9%{?dist}
Release: 10%{?dist}
License: GPLv2+ and LGPLv2+
URL: http://www.freedesktop.org/software/PackageKit/
Source0: http://www.freedesktop.org/software/PackageKit/releases/%{name}-%{version}.tar.xz
@ -40,6 +40,9 @@ Patch2: 0001-offline-update-Use-new-plymouth-system-upgrade-and-r.patch
# https://pagure.io/releng/issue/7445
Patch3: 0001-dnf-Don-t-override-DnfContext-s-release_ver-for-the-.patch
# https://github.com/hughsie/PackageKit/pull/330
Patch4: 0001-Do-not-trigger-an-inotity-event-when-the-AppStream-X.patch
BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: xmlto
BuildRequires: gtk-doc
@ -340,6 +343,10 @@ systemctl disable packagekit-offline-update.service > /dev/null 2>&1 || :
%{_datadir}/vala/vapi/packagekit-glib2.vapi
%changelog
* Fri Jul 19 2019 Richard Hughes <rhughes@redhat.com> - 1.1.12-10
- Do not trigger an inotity event when the AppStream XML data is unchanged
- Remove the unconditional copy to speed up gnome-software startup.
* Fri Jul 12 2019 Kalev Lember <klember@redhat.com> - 1.1.12-9
- Drop unused comps-extras requires