diff --git a/0001-gs-plugin-loader-Reset-online-updates-timestamp-only.patch b/0001-gs-plugin-loader-Reset-online-updates-timestamp-only.patch new file mode 100644 index 0000000..94e4b57 --- /dev/null +++ b/0001-gs-plugin-loader-Reset-online-updates-timestamp-only.patch @@ -0,0 +1,35 @@ +From 9a48a04d180f9d3e988efe761cee7bfd9bea79dd Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Fri, 5 Mar 2021 13:34:40 +0100 +Subject: [PATCH] gs-plugin-loader: Reset online-updates-timestamp only when + did the update + +The gs_plugin_loader_generic_update() is used in two cases, when updating +the software and when downloading the software. The former case can reset +the online-updates-timestamp, but the later not, because it did not +update anything. + +This blocks the update notifications from showing up after the first +run of the Software. +--- + lib/gs-plugin-loader.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c +index 2dad71f86..358cb8439 100644 +--- a/lib/gs-plugin-loader.c ++++ b/lib/gs-plugin-loader.c +@@ -3124,7 +3124,9 @@ gs_plugin_loader_generic_update (GsPluginLoader *plugin_loader, + gs_plugin_status_update (plugin, NULL, GS_PLUGIN_STATUS_FINISHED); + } + +- gs_utils_set_online_updates_timestamp (plugin_loader->settings); ++ if (gs_plugin_job_get_action (helper->plugin_job) == GS_PLUGIN_ACTION_UPDATE) ++ gs_utils_set_online_updates_timestamp (plugin_loader->settings); ++ + return TRUE; + } + +-- +2.30.1 + diff --git a/gnome-software.spec b/gnome-software.spec index b4e0ad8..8c1496f 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -12,12 +12,16 @@ Name: gnome-software Version: 40~beta -Release: 1%{?dist} +Release: 2%{?dist} Summary: A software center for GNOME License: GPLv2+ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/40/%{name}-%{tarball_version}.tar.xz +# Fix update notifications: +# https://gitlab.gnome.org/GNOME/gnome-software/-/merge_requests/643 +# https://bugzilla.redhat.com/show_bug.cgi?id=1930401 +Patch0: 0001-gs-plugin-loader-Reset-online-updates-timestamp-only.patch BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc @@ -45,7 +49,7 @@ BuildRequires: ostree-devel BuildRequires: rpm-devel BuildRequires: rpm-ostree-devel BuildRequires: libgudev1-devel -BuildRequires: sysprof-devel +BuildRequires: sysprof-capture-devel BuildRequires: valgrind-devel Requires: appstream-data @@ -204,6 +208,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Wed Mar 10 2021 Adam Williamson - 40~beta-2 +- Backport MR #643 to fix update notifications on first run (#1930401) + * Tue Feb 16 2021 Kalev Lember - 40~beta-1 - Update to 40.beta