From ac80077fe7a799bc2bbfeafe31c537b53784c096 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Tue, 28 Aug 2018 15:15:28 +0100 Subject: [PATCH 01/12] Update to 3.29.92 --- .gitignore | 1 + gnome-software.spec | 30 +++++++++++++++++------------- sources | 2 +- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index c01a7d7..13298c0 100644 --- a/.gitignore +++ b/.gitignore @@ -91,3 +91,4 @@ /gnome-software-3.28.0.tar.xz /gnome-software-3.28.1.tar.xz /gnome-software-3.29.1.tar.xz +/gnome-software-3.29.92.tar.xz diff --git a/gnome-software.spec b/gnome-software.spec index 0eff1e3..d551574 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -10,8 +10,8 @@ %global flatpak_version 0.9.4 Name: gnome-software -Version: 3.29.1 -Release: 2%{?dist} +Version: 3.29.92 +Release: 1%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -44,7 +44,7 @@ BuildRequires: libgudev1-devel BuildRequires: valgrind-devel BuildRequires: liboauth-devel %if 0%{?fedora} -BuildRequires: snapd-glib-devel +BuildRequires: snapd-glib-devel >= 1.42 %endif Requires: appstream-data @@ -69,7 +69,7 @@ Requires: libsoup%{?_isa} >= %{libsoup_version} Requires: PackageKit%{?_isa} >= %{packagekit_version} # this is not a library version -%define gs_plugin_version 11 +%define gs_plugin_version 12 %description gnome-software is an application that makes it easy to add, remove @@ -94,6 +94,7 @@ Editor for designing banners for GNOME Software. %package snap Summary: Support for Ubuntu Snap packages Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: snapd-login-service Supplements: (gnome-software%{?_isa} and snapd%{?_isa}) %description snap @@ -106,17 +107,17 @@ Adds support for Snap packages from the Snap store. %build %meson \ %if 0%{?fedora} - -Denable-snap=true \ + -Dsnap=true \ %else - -Denable-snap=false \ + -Dsnap=false \ %endif - -Denable-gudev=true \ - -Denable-packagekit=true \ - -Denable-external-appstream=false \ - -Denable-rpm-ostree=true \ - -Denable-tests=false \ - -Denable-ubuntuone=false \ - -Denable-ubuntu-reviews=false + -Dgudev=true \ + -Dpackagekit=true \ + -Dexternal_appstream=false \ + -Drpm_ostree=true \ + -Dtests=false \ + -Dubuntuone=false \ + -Dubuntu_reviews=false %meson_build %install @@ -221,6 +222,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_mandir}/man1/gnome-software-editor.1* %changelog +* Tue Aug 28 2018 Richard Hughes - 3.29.92-1 +- Update to 3.29.92 + * Fri Jul 13 2018 Fedora Release Engineering - 3.29.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/sources b/sources index 0fa3177..719f7c6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-3.29.1.tar.xz) = 505582ee5c1d20a9e75ee3a57288643b6ce5fa6bceb68d81d4306faeb0fefe32f5ce450f7f24a4189b4680c56f8a0eb7456191df8c3826113a6fa11934240225 +SHA512 (gnome-software-3.29.92.tar.xz) = 8754371563462ec5437a498babedb59888fffbb203aba388fbfb604b75c9f0a375259742ce0e27f8a35287ee476837bc6a756b169ea47ced42634d7be65a1728 From 9c4bc38864eaf23293c80ea33b73c9c7e4d28a93 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Thu, 6 Sep 2018 15:13:31 +0200 Subject: [PATCH 02/12] Update to 3.30.0 --- .gitignore | 1 + gnome-software.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 13298c0..f2eb7a4 100644 --- a/.gitignore +++ b/.gitignore @@ -92,3 +92,4 @@ /gnome-software-3.28.1.tar.xz /gnome-software-3.29.1.tar.xz /gnome-software-3.29.92.tar.xz +/gnome-software-3.30.0.tar.xz diff --git a/gnome-software.spec b/gnome-software.spec index d551574..8ba4243 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -10,13 +10,13 @@ %global flatpak_version 0.9.4 Name: gnome-software -Version: 3.29.92 +Version: 3.30.0 Release: 1%{?dist} Summary: A software center for GNOME License: GPLv2+ URL: https://wiki.gnome.org/Apps/Software -Source0: https://download.gnome.org/sources/gnome-software/3.29/%{name}-%{version}.tar.xz +Source0: https://download.gnome.org/sources/gnome-software/3.30/%{name}-%{version}.tar.xz BuildRequires: gcc BuildRequires: gettext @@ -222,6 +222,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_mandir}/man1/gnome-software-editor.1* %changelog +* Thu Sep 06 2018 Kalev Lember - 3.30.0-1 +- Update to 3.30.0 + * Tue Aug 28 2018 Richard Hughes - 3.29.92-1 - Update to 3.29.92 diff --git a/sources b/sources index 719f7c6..580dfb4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-3.29.92.tar.xz) = 8754371563462ec5437a498babedb59888fffbb203aba388fbfb604b75c9f0a375259742ce0e27f8a35287ee476837bc6a756b169ea47ced42634d7be65a1728 +SHA512 (gnome-software-3.30.0.tar.xz) = fad8aa4f62ec83b29deae9c5aae709b1155060b621a26d608051b626395e497ccb77143624a593119ba2cbbb69da70390b0b6e2a0da56d48e53782edfbcd5ebc From 281507f461d056af6811e740a199116767336707 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 25 Sep 2018 12:26:13 +0200 Subject: [PATCH 03/12] Update to 3.30.1 --- .gitignore | 1 + gnome-software.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f2eb7a4..04d586f 100644 --- a/.gitignore +++ b/.gitignore @@ -93,3 +93,4 @@ /gnome-software-3.29.1.tar.xz /gnome-software-3.29.92.tar.xz /gnome-software-3.30.0.tar.xz +/gnome-software-3.30.1.tar.xz diff --git a/gnome-software.spec b/gnome-software.spec index 8ba4243..72cd7ae 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -10,7 +10,7 @@ %global flatpak_version 0.9.4 Name: gnome-software -Version: 3.30.0 +Version: 3.30.1 Release: 1%{?dist} Summary: A software center for GNOME @@ -222,6 +222,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_mandir}/man1/gnome-software-editor.1* %changelog +* Tue Sep 25 2018 Kalev Lember - 3.30.1-1 +- Update to 3.30.1 + * Thu Sep 06 2018 Kalev Lember - 3.30.0-1 - Update to 3.30.0 diff --git a/sources b/sources index 580dfb4..a67f4ef 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-3.30.0.tar.xz) = fad8aa4f62ec83b29deae9c5aae709b1155060b621a26d608051b626395e497ccb77143624a593119ba2cbbb69da70390b0b6e2a0da56d48e53782edfbcd5ebc +SHA512 (gnome-software-3.30.1.tar.xz) = 2e983905d6c91a01a3308575a7e2eed4ada3cfd40e74863a6baba494814d1626ed900c45747fe8feca9c2c4bc4fe12e612ed59eb58a5e3d5713648e1f032c711 From c96db320544d6066246cbbb13c3af437ac0d8803 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Wed, 26 Sep 2018 16:33:59 +0200 Subject: [PATCH 04/12] Add modular repos to official repos list --- gnome-software.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gnome-software.spec b/gnome-software.spec index 72cd7ae..7d85e59 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -11,7 +11,7 @@ Name: gnome-software Version: 3.30.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -130,7 +130,7 @@ desktop-file-edit %{buildroot}%{_datadir}/applications/org.gnome.Software.deskto # set up for Fedora cat >> %{buildroot}%{_datadir}/glib-2.0/schemas/org.gnome.software-fedora.gschema.override << FOE [org.gnome.software] -official-repos = [ 'fedora', 'fedora-debuginfo', 'fedora-source', 'koji-override-0', 'koji-override-1', 'rawhide', 'rawhide-debuginfo', 'rawhide-source', 'updates', 'updates-debuginfo', 'updates-source', 'updates-testing', 'updates-testing-debuginfo', 'updates-testing-source' ] +official-repos = [ 'fedora', 'fedora-debuginfo', 'fedora-source', 'koji-override-0', 'koji-override-1', 'rawhide', 'rawhide-debuginfo', 'rawhide-source', 'updates', 'updates-debuginfo', 'updates-source', 'updates-testing', 'updates-testing-debuginfo', 'updates-testing-source', 'fedora-modular', 'fedora-modular-debuginfo', 'fedora-modular-source', 'rawhide-modular', 'rawhide-modular-debuginfo', 'rawhide-modular-source' ] FOE %find_lang %name --with-gnome @@ -222,6 +222,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_mandir}/man1/gnome-software-editor.1* %changelog +* Wed Sep 26 2018 Kalev Lember - 3.30.1-2 +- Add modular repos to official repos list + * Tue Sep 25 2018 Kalev Lember - 3.30.1-1 - Update to 3.30.1 From fb5d7b9b270c5c5825bffa7af60a0c4083d19d6b Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Fri, 5 Oct 2018 17:06:26 +0200 Subject: [PATCH 05/12] Update to 3.30.2 --- .gitignore | 1 + gnome-software.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 04d586f..06c14ea 100644 --- a/.gitignore +++ b/.gitignore @@ -94,3 +94,4 @@ /gnome-software-3.29.92.tar.xz /gnome-software-3.30.0.tar.xz /gnome-software-3.30.1.tar.xz +/gnome-software-3.30.2.tar.xz diff --git a/gnome-software.spec b/gnome-software.spec index 7d85e59..dae12fe 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -10,8 +10,8 @@ %global flatpak_version 0.9.4 Name: gnome-software -Version: 3.30.1 -Release: 2%{?dist} +Version: 3.30.2 +Release: 1%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -222,6 +222,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_mandir}/man1/gnome-software-editor.1* %changelog +* Fri Oct 05 2018 Kalev Lember - 3.30.2-1 +- Update to 3.30.2 + * Wed Sep 26 2018 Kalev Lember - 3.30.1-2 - Add modular repos to official repos list diff --git a/sources b/sources index a67f4ef..a6512e4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-3.30.1.tar.xz) = 2e983905d6c91a01a3308575a7e2eed4ada3cfd40e74863a6baba494814d1626ed900c45747fe8feca9c2c4bc4fe12e612ed59eb58a5e3d5713648e1f032c711 +SHA512 (gnome-software-3.30.2.tar.xz) = da43cedf4b9da246adc3c12d2a43499407e0b9bbdc29bc8b10d8058bf5266734ad21cc810bc7648149f3d7b1046f5f03fcd58391b74ffba3150b5e9632f2a201 From 603bf65c71f1d5177e57a00e805a1c818fde68de Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Thu, 18 Oct 2018 15:40:24 +0200 Subject: [PATCH 06/12] Update to 3.30.3 --- .gitignore | 1 + gnome-software.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 06c14ea..6b77eb6 100644 --- a/.gitignore +++ b/.gitignore @@ -95,3 +95,4 @@ /gnome-software-3.30.0.tar.xz /gnome-software-3.30.1.tar.xz /gnome-software-3.30.2.tar.xz +/gnome-software-3.30.3.tar.xz diff --git a/gnome-software.spec b/gnome-software.spec index dae12fe..feccd8f 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -1,4 +1,4 @@ -%global glib2_version 2.46.0 +%global glib2_version 2.56.0 %global gtk3_version 3.22.4 %global json_glib_version 1.2.0 %global packagekit_version 1.1.1 @@ -10,7 +10,7 @@ %global flatpak_version 0.9.4 Name: gnome-software -Version: 3.30.2 +Version: 3.30.3 Release: 1%{?dist} Summary: A software center for GNOME @@ -222,6 +222,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_mandir}/man1/gnome-software-editor.1* %changelog +* Thu Oct 18 2018 Kalev Lember - 3.30.3-1 +- Update to 3.30.3 + * Fri Oct 05 2018 Kalev Lember - 3.30.2-1 - Update to 3.30.2 diff --git a/sources b/sources index a6512e4..beace11 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-3.30.2.tar.xz) = da43cedf4b9da246adc3c12d2a43499407e0b9bbdc29bc8b10d8058bf5266734ad21cc810bc7648149f3d7b1046f5f03fcd58391b74ffba3150b5e9632f2a201 +SHA512 (gnome-software-3.30.3.tar.xz) = 69dfa8d0ad8421c0bd7be92fcfcacb00ff16a92fcd0086f90afa40e8b346ba08e1c0ba2a17686a94fdd417cbb326d7ce332fa35c9912d421fa34c7d1dfb06182 From ca8a2031f3a45e43dad248ffc8eb84324cdd559d Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Wed, 24 Oct 2018 15:07:33 +0200 Subject: [PATCH 07/12] Update to 3.30.5 --- .gitignore | 1 + ...vercmp_full-version-check-for-Fedora.patch | 50 +++++++++++++++++++ gnome-software.spec | 10 +++- sources | 2 +- 4 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 0001-Lower-as_utils_vercmp_full-version-check-for-Fedora.patch diff --git a/.gitignore b/.gitignore index 6b77eb6..d28320e 100644 --- a/.gitignore +++ b/.gitignore @@ -96,3 +96,4 @@ /gnome-software-3.30.1.tar.xz /gnome-software-3.30.2.tar.xz /gnome-software-3.30.3.tar.xz +/gnome-software-3.30.5.tar.xz diff --git a/0001-Lower-as_utils_vercmp_full-version-check-for-Fedora.patch b/0001-Lower-as_utils_vercmp_full-version-check-for-Fedora.patch new file mode 100644 index 0000000..fdb2ccd --- /dev/null +++ b/0001-Lower-as_utils_vercmp_full-version-check-for-Fedora.patch @@ -0,0 +1,50 @@ +From 96f516a4e01b00094919c6c365d804a109b5875f Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Wed, 24 Oct 2018 15:00:59 +0200 +Subject: [PATCH] Lower as_utils_vercmp_full version check for Fedora + +We have new as_utils_vercmp_full API backported to +libappstream-glib-0.7.14-2.fc29. +--- + lib/gs-plugin-loader.c | 2 +- + src/gs-update-dialog.c | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c +index 93e394906..b84a0ba65 100644 +--- a/lib/gs-plugin-loader.c ++++ b/lib/gs-plugin-loader.c +@@ -1423,7 +1423,7 @@ gs_plugin_loader_app_sort_match_value_cb (GsApp *app1, GsApp *app2, gpointer use + static gint + gs_plugin_loader_app_sort_version_cb (GsApp *app1, GsApp *app2, gpointer user_data) + { +-#if AS_CHECK_VERSION(0,7,15) ++#if AS_CHECK_VERSION(0,7,14) + return as_utils_vercmp_full (gs_app_get_version (app1), + gs_app_get_version (app2), + AS_VERSION_COMPARE_FLAG_NONE); +diff --git a/src/gs-update-dialog.c b/src/gs-update-dialog.c +index b4c1b1187..e92cd5b87 100644 +--- a/src/gs-update-dialog.c ++++ b/src/gs-update-dialog.c +@@ -374,7 +374,7 @@ is_downgrade (const gchar *evr1, + * part of the semantic version */ + + /* check version */ +-#if AS_CHECK_VERSION(0,7,15) ++#if AS_CHECK_VERSION(0,7,14) + rc = as_utils_vercmp_full (version1, version2, + AS_VERSION_COMPARE_FLAG_NONE); + #else +@@ -384,7 +384,7 @@ is_downgrade (const gchar *evr1, + return rc > 0; + + /* check release */ +-#if AS_CHECK_VERSION(0,7,15) ++#if AS_CHECK_VERSION(0,7,14) + rc = as_utils_vercmp_full (version1, version2, + AS_VERSION_COMPARE_FLAG_NONE); + #else +-- +2.19.1 + diff --git a/gnome-software.spec b/gnome-software.spec index feccd8f..3e6c63c 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -2,7 +2,7 @@ %global gtk3_version 3.22.4 %global json_glib_version 1.2.0 %global packagekit_version 1.1.1 -%global appstream_glib_version 0.7.8 +%global appstream_glib_version 0.7.14-2 %global libsoup_version 2.52.0 %global gsettings_desktop_schemas_version 3.12.0 %global gnome_desktop_version 3.18.0 @@ -10,13 +10,16 @@ %global flatpak_version 0.9.4 Name: gnome-software -Version: 3.30.3 +Version: 3.30.5 Release: 1%{?dist} Summary: A software center for GNOME License: GPLv2+ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/3.30/%{name}-%{version}.tar.xz +# Lower appstream-glib version check as we have the required new API backported to +# libappstream-glib-0.7.14-2.fc29. +Patch0: 0001-Lower-as_utils_vercmp_full-version-check-for-Fedora.patch BuildRequires: gcc BuildRequires: gettext @@ -222,6 +225,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_mandir}/man1/gnome-software-editor.1* %changelog +* Wed Oct 24 2018 Kalev Lember - 3.30.5-1 +- Update to 3.30.5 + * Thu Oct 18 2018 Kalev Lember - 3.30.3-1 - Update to 3.30.3 diff --git a/sources b/sources index beace11..d6a297d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-3.30.3.tar.xz) = 69dfa8d0ad8421c0bd7be92fcfcacb00ff16a92fcd0086f90afa40e8b346ba08e1c0ba2a17686a94fdd417cbb326d7ce332fa35c9912d421fa34c7d1dfb06182 +SHA512 (gnome-software-3.30.5.tar.xz) = a60d852a0c3ced45c37f1d4ec82c021aa705ad9e170ae3a532b28915bd2db2dc73e136b7df8a3e95b0daccea749fcf076e38f12bdb0c1dea71f491cb8a188457 From 7fbfd188629b049c9255c53417cfc7b393559025 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 18 Dec 2018 02:46:40 +0100 Subject: [PATCH 08/12] Update to 3.30.6 --- .gitignore | 1 + ...re-new-API-version-checks-for-Fedora.patch | 145 ++++++++++++++++++ gnome-software.spec | 10 +- sources | 2 +- 4 files changed, 154 insertions(+), 4 deletions(-) create mode 100644 0001-Lower-AsStore-new-API-version-checks-for-Fedora.patch diff --git a/.gitignore b/.gitignore index d28320e..0e915ba 100644 --- a/.gitignore +++ b/.gitignore @@ -97,3 +97,4 @@ /gnome-software-3.30.2.tar.xz /gnome-software-3.30.3.tar.xz /gnome-software-3.30.5.tar.xz +/gnome-software-3.30.6.tar.xz diff --git a/0001-Lower-AsStore-new-API-version-checks-for-Fedora.patch b/0001-Lower-AsStore-new-API-version-checks-for-Fedora.patch new file mode 100644 index 0000000..3b61293 --- /dev/null +++ b/0001-Lower-AsStore-new-API-version-checks-for-Fedora.patch @@ -0,0 +1,145 @@ +From f91c54a70860ed12270bbafa121acae36f29badb Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Tue, 18 Dec 2018 02:44:31 +0100 +Subject: [PATCH] Lower AsStore new API version checks for Fedora + +We have new the AsStore thread safety patches along with new thread safe +API backported to libappstream-glib-0.7.14-3.fc29. +--- + plugins/core/gs-appstream.c | 12 ++++++------ + plugins/core/gs-plugin-appstream.c | 12 ++++++------ + plugins/flatpak/gs-flatpak.c | 2 +- + 3 files changed, 13 insertions(+), 13 deletions(-) + +diff --git a/plugins/core/gs-appstream.c b/plugins/core/gs-appstream.c +index b7bccd19a..7b606fe0d 100644 +--- a/plugins/core/gs-appstream.c ++++ b/plugins/core/gs-appstream.c +@@ -860,7 +860,7 @@ gs_appstream_store_search (GsPlugin *plugin, + gboolean ret = TRUE; + g_autoptr(GPtrArray) array = NULL; + +-#if AS_CHECK_VERSION(0,7,15) ++#if AS_CHECK_VERSION(0,7,14) + array = as_store_dup_apps (store); + #else + array = g_ptr_array_ref (as_store_get_apps (store)); +@@ -937,7 +937,7 @@ gs_appstream_store_add_category_apps (GsPlugin *plugin, + g_autoptr(GPtrArray) array = NULL; + + /* just look at each app in turn */ +-#if AS_CHECK_VERSION(0,7,15) ++#if AS_CHECK_VERSION(0,7,14) + array = as_store_dup_apps (store); + #else + array = g_ptr_array_ref (as_store_get_apps (store)); +@@ -985,7 +985,7 @@ gs_appstream_store_add_categories (GsPlugin *plugin, + g_autoptr(GPtrArray) array = NULL; + + /* find out how many packages are in each category */ +-#if AS_CHECK_VERSION(0,7,15) ++#if AS_CHECK_VERSION(0,7,14) + array = as_store_dup_apps (store); + #else + array = g_ptr_array_ref (as_store_get_apps (store)); +@@ -1013,7 +1013,7 @@ gs_appstream_add_popular (GsPlugin *plugin, + { + g_autoptr(GPtrArray) array = NULL; + +-#if AS_CHECK_VERSION(0,7,15) ++#if AS_CHECK_VERSION(0,7,14) + array = as_store_dup_apps (store); + #else + array = g_ptr_array_ref (as_store_get_apps (store)); +@@ -1059,7 +1059,7 @@ gs_appstream_add_recent (GsPlugin *plugin, + { + g_autoptr(GPtrArray) array = NULL; + +-#if AS_CHECK_VERSION(0,7,15) ++#if AS_CHECK_VERSION(0,7,14) + array = as_store_dup_apps (store); + #else + array = g_ptr_array_ref (as_store_get_apps (store)); +@@ -1088,7 +1088,7 @@ gs_appstream_add_featured (GsPlugin *plugin, + { + g_autoptr(GPtrArray) array = NULL; + +-#if AS_CHECK_VERSION(0,7,15) ++#if AS_CHECK_VERSION(0,7,14) + array = as_store_dup_apps (store); + #else + array = g_ptr_array_ref (as_store_get_apps (store)); +diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c +index 77d004162..ce0ca9bda 100644 +--- a/plugins/core/gs-plugin-appstream.c ++++ b/plugins/core/gs-plugin-appstream.c +@@ -56,7 +56,7 @@ gs_plugin_appstream_create_app_hash (AsStore *store) + + hash = g_hash_table_new_full (g_str_hash, g_str_equal, + g_free, (GDestroyNotify) g_object_unref); +-#if AS_CHECK_VERSION(0,7,15) ++#if AS_CHECK_VERSION(0,7,14) + apps = as_store_dup_apps (store); + #else + apps = g_ptr_array_ref (as_store_get_apps (store)); +@@ -290,7 +290,7 @@ gs_plugin_setup (GsPlugin *plugin, GCancellable *cancellable, GError **error) + return FALSE; + } + } +-#if AS_CHECK_VERSION(0,7,15) ++#if AS_CHECK_VERSION(0,7,14) + items = as_store_dup_apps (priv->store); + #else + items = g_ptr_array_ref (as_store_get_apps (priv->store)); +@@ -391,7 +391,7 @@ gs_plugin_refine_from_id (GsPlugin *plugin, + g_autoptr(GPtrArray) apps_merge = NULL; + + g_debug ("no app with ID %s found in system appstream", unique_id); +-#if AS_CHECK_VERSION(0,7,15) ++#if AS_CHECK_VERSION(0,7,14) + apps = as_store_dup_apps (priv->store); + #else + apps = g_ptr_array_ref (as_store_get_apps (priv->store)); +@@ -405,7 +405,7 @@ gs_plugin_refine_from_id (GsPlugin *plugin, + } + + /* fall back to trying to get a merge app */ +-#if AS_CHECK_VERSION(0,7,15) ++#if AS_CHECK_VERSION(0,7,14) + apps_merge = as_store_dup_apps_by_id_merge (priv->store, gs_app_get_id (app)); + for (guint i = 0; i < apps_merge->len; i++) { + item = g_ptr_array_index (apps_merge, i); +@@ -472,7 +472,7 @@ gs_plugin_add_distro_upgrades (GsPlugin *plugin, + g_autoptr(GPtrArray) array = NULL; + + /* find any upgrades */ +-#if AS_CHECK_VERSION(0,7,15) ++#if AS_CHECK_VERSION(0,7,14) + array = as_store_dup_apps (priv->store); + #else + array = g_ptr_array_ref (as_store_get_apps (priv->store)); +@@ -620,7 +620,7 @@ gs_plugin_add_installed (GsPlugin *plugin, + g_autoptr(GPtrArray) array = NULL; + + /* search categories for the search term */ +-#if AS_CHECK_VERSION(0,7,15) ++#if AS_CHECK_VERSION(0,7,14) + array = as_store_dup_apps (priv->store); + #else + array = g_ptr_array_ref (as_store_get_apps (priv->store)); +diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c +index b835d843c..921fd12e9 100644 +--- a/plugins/flatpak/gs-flatpak.c ++++ b/plugins/flatpak/gs-flatpak.c +@@ -328,7 +328,7 @@ gs_flatpak_add_apps_from_xremote (GsFlatpak *self, + } + + /* override the *AppStream* origin */ +-#if AS_CHECK_VERSION(0,7,15) ++#if AS_CHECK_VERSION(0,7,14) + apps = as_store_dup_apps (store); + #else + apps = g_ptr_array_ref (as_store_get_apps (store)); +-- +2.19.1 + diff --git a/gnome-software.spec b/gnome-software.spec index 3e6c63c..f644ae8 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -2,7 +2,7 @@ %global gtk3_version 3.22.4 %global json_glib_version 1.2.0 %global packagekit_version 1.1.1 -%global appstream_glib_version 0.7.14-2 +%global appstream_glib_version 0.7.14-3 %global libsoup_version 2.52.0 %global gsettings_desktop_schemas_version 3.12.0 %global gnome_desktop_version 3.18.0 @@ -10,7 +10,7 @@ %global flatpak_version 0.9.4 Name: gnome-software -Version: 3.30.5 +Version: 3.30.6 Release: 1%{?dist} Summary: A software center for GNOME @@ -18,8 +18,9 @@ License: GPLv2+ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/3.30/%{name}-%{version}.tar.xz # Lower appstream-glib version check as we have the required new API backported to -# libappstream-glib-0.7.14-2.fc29. +# libappstream-glib-0.7.14-3.fc29. Patch0: 0001-Lower-as_utils_vercmp_full-version-check-for-Fedora.patch +Patch1: 0001-Lower-AsStore-new-API-version-checks-for-Fedora.patch BuildRequires: gcc BuildRequires: gettext @@ -225,6 +226,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_mandir}/man1/gnome-software-editor.1* %changelog +* Tue Dec 18 2018 Kalev Lember - 3.30.6-1 +- Update to 3.30.6 + * Wed Oct 24 2018 Kalev Lember - 3.30.5-1 - Update to 3.30.5 diff --git a/sources b/sources index d6a297d..e41e805 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-3.30.5.tar.xz) = a60d852a0c3ced45c37f1d4ec82c021aa705ad9e170ae3a532b28915bd2db2dc73e136b7df8a3e95b0daccea749fcf076e38f12bdb0c1dea71f491cb8a188457 +SHA512 (gnome-software-3.30.6.tar.xz) = dd98e9e61469fc5566ab569f09bdc06ccb5812a236e305185b911c70364e2983f257e939aed0bb61778163084fb5628d63ff6bd5f056d4a7626a2e771ad6426a From e63a38c6edf51ee96248c243cfb00a540e2d5dab Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Mon, 25 Feb 2019 14:50:02 +0100 Subject: [PATCH 09/12] Backport various fixes to error messages ... to avoid the dreaded "Unable to update '(null)'" error and add some more context. --- gnome-software-3-30-error-message-fixes.patch | 473 ++++++++++++++++++ gnome-software.spec | 9 +- 2 files changed, 481 insertions(+), 1 deletion(-) create mode 100644 gnome-software-3-30-error-message-fixes.patch diff --git a/gnome-software-3-30-error-message-fixes.patch b/gnome-software-3-30-error-message-fixes.patch new file mode 100644 index 0000000..a682681 --- /dev/null +++ b/gnome-software-3-30-error-message-fixes.patch @@ -0,0 +1,473 @@ +From 0a1e76d866379ce6115aacd2cdee75db15bebab0 Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Tue, 15 Jan 2019 23:48:33 +0100 +Subject: [PATCH 1/3] shell: Improve the error message when whole update + operation fails + +In case the whole updates operation fails and we don't have the data +which app failed, show 'Unable to install updates' error instead of +'Unable to update "(null)"'. + +Fixes: https://gitlab.gnome.org/GNOME/gnome-software/issues/480 +--- + src/gs-shell.c | 120 +++++++++++++++++++++++++++++++++++-------------- + 1 file changed, 87 insertions(+), 33 deletions(-) + +diff --git a/src/gs-shell.c b/src/gs-shell.c +index 6f1cda816..7c2f86d81 100644 +--- a/src/gs-shell.c ++++ b/src/gs-shell.c +@@ -1355,23 +1355,34 @@ gs_shell_show_event_update (GsShell *shell, GsPluginEvent *event) + g_autofree gchar *str_origin = NULL; + g_autoptr(GString) str = g_string_new (NULL); + +- str_app = gs_shell_get_title_from_app (app); + switch (error->code) { + case GS_PLUGIN_ERROR_DOWNLOAD_FAILED: +- if (origin != NULL) { ++ if (app != NULL && origin != NULL) { ++ str_app = gs_shell_get_title_from_app (app); + str_origin = gs_shell_get_title_from_origin (origin); + /* TRANSLATORS: failure text for the in-app notification, + * where the first %s is the app name (e.g. "GIMP") and + * the second %s is the origin, e.g. "Fedora" or + * "Fedora Project [fedoraproject.org]" */ +- g_string_append_printf (str, _("Unable to update %s from %s"), ++ g_string_append_printf (str, _("Unable to update %s from %s as download failed"), + str_app, str_origin); + buttons = TRUE; +- } else { ++ } else if (app != NULL) { ++ str_app = gs_shell_get_title_from_app (app); + /* TRANSLATORS: failure text for the in-app notification, + * where the %s is the application name (e.g. "GIMP") */ + g_string_append_printf (str, _("Unable to update %s as download failed"), + str_app); ++ } else if (origin != NULL) { ++ str_origin = gs_shell_get_title_from_origin (origin); ++ /* TRANSLATORS: failure text for the in-app notification, ++ * where the %s is the origin, e.g. "Fedora" or ++ * "Fedora Project [fedoraproject.org]" */ ++ g_string_append_printf (str, _("Unable to install updates from %s as download failed"), ++ str_origin); ++ } else { ++ /* TRANSLATORS: failure text for the in-app notification */ ++ g_string_append_printf (str, _("Unable to install updates as download failed")); + } + break; + case GS_PLUGIN_ERROR_NO_NETWORK: +@@ -1382,49 +1393,92 @@ gs_shell_show_event_update (GsShell *shell, GsPluginEvent *event) + buttons |= GS_SHELL_EVENT_BUTTON_NETWORK_SETTINGS; + break; + case GS_PLUGIN_ERROR_NO_SPACE: +- /* TRANSLATORS: failure text for the in-app notification, +- * where the %s is the application name (e.g. "GIMP") */ +- g_string_append_printf (str, _("Unable to update %s: " +- "not enough disk space"), +- str_app); ++ if (app != NULL) { ++ str_app = gs_shell_get_title_from_app (app); ++ /* TRANSLATORS: failure text for the in-app notification, ++ * where the %s is the application name (e.g. "GIMP") */ ++ g_string_append_printf (str, _("Unable to update %s: " ++ "not enough disk space"), ++ str_app); ++ } else { ++ /* TRANSLATORS: failure text for the in-app notification */ ++ g_string_append_printf (str, _("Unable to install updates: " ++ "not enough disk space")); ++ } + buttons |= GS_SHELL_EVENT_BUTTON_NO_SPACE; + break; + case GS_PLUGIN_ERROR_AUTH_REQUIRED: + case GS_PLUGIN_ERROR_PIN_REQUIRED: +- /* TRANSLATORS: failure text for the in-app notification, +- * where the %s is the application name (e.g. "GIMP") */ +- g_string_append_printf (str, _("Unable to update %s: " +- "authentication was required"), +- str_app); ++ if (app != NULL) { ++ str_app = gs_shell_get_title_from_app (app); ++ /* TRANSLATORS: failure text for the in-app notification, ++ * where the %s is the application name (e.g. "GIMP") */ ++ g_string_append_printf (str, _("Unable to update %s: " ++ "authentication was required"), ++ str_app); ++ } else { ++ /* TRANSLATORS: failure text for the in-app notification */ ++ g_string_append_printf (str, _("Unable to install updates: " ++ "authentication was required")); ++ } + break; + case GS_PLUGIN_ERROR_AUTH_INVALID: +- /* TRANSLATORS: failure text for the in-app notification, +- * where the %s is the application name (e.g. "GIMP") */ +- g_string_append_printf (str, _("Unable to update %s: " +- "authentication was invalid"), +- str_app); ++ if (app != NULL) { ++ str_app = gs_shell_get_title_from_app (app); ++ /* TRANSLATORS: failure text for the in-app notification, ++ * where the %s is the application name (e.g. "GIMP") */ ++ g_string_append_printf (str, _("Unable to update %s: " ++ "authentication was invalid"), ++ str_app); ++ } else { ++ /* TRANSLATORS: failure text for the in-app notification */ ++ g_string_append_printf (str, _("Unable to install updates: " ++ "authentication was invalid")); ++ } + break; + case GS_PLUGIN_ERROR_NO_SECURITY: +- /* TRANSLATORS: failure text for the in-app notification, +- * where the %s is the application name (e.g. "GIMP") */ +- g_string_append_printf (str, _("Unable to update %s: " +- "you do not have permission to " +- "update software"), +- str_app); ++ if (app != NULL) { ++ str_app = gs_shell_get_title_from_app (app); ++ /* TRANSLATORS: failure text for the in-app notification, ++ * where the %s is the application name (e.g. "GIMP") */ ++ g_string_append_printf (str, _("Unable to update %s: " ++ "you do not have permission to " ++ "update software"), ++ str_app); ++ } else { ++ /* TRANSLATORS: failure text for the in-app notification */ ++ g_string_append_printf (str, _("Unable to install updates: " ++ "you do not have permission to " ++ "update software")); ++ } + break; + case GS_PLUGIN_ERROR_AC_POWER_REQUIRED: +- /* TRANSLATORS: failure text for the in-app notification, +- * where the %s is the application name (e.g. "Dell XPS 13") */ +- g_string_append_printf (str, _("Unable to update %s: " +- "AC power is required"), +- str_app); ++ if (app != NULL) { ++ str_app = gs_shell_get_title_from_app (app); ++ /* TRANSLATORS: failure text for the in-app notification, ++ * where the %s is the application name (e.g. "Dell XPS 13") */ ++ g_string_append_printf (str, _("Unable to update %s: " ++ "AC power is required"), ++ str_app); ++ } else { ++ /* TRANSLATORS: failure text for the in-app notification, ++ * where the %s is the application name (e.g. "Dell XPS 13") */ ++ g_string_append_printf (str, _("Unable to install updates: " ++ "AC power is required")); ++ } + break; + case GS_PLUGIN_ERROR_CANCELLED: + break; + default: +- /* TRANSLATORS: failure text for the in-app notification, +- * where the %s is the application name (e.g. "GIMP") */ +- g_string_append_printf (str, _("Unable to update %s"), str_app); ++ if (app != NULL) { ++ str_app = gs_shell_get_title_from_app (app); ++ /* TRANSLATORS: failure text for the in-app notification, ++ * where the %s is the application name (e.g. "GIMP") */ ++ g_string_append_printf (str, _("Unable to update %s"), str_app); ++ } else { ++ /* TRANSLATORS: failure text for the in-app notification */ ++ g_string_append_printf (str, _("Unable to install updates")); ++ } + break; + } + if (str->len == 0) +-- +2.21.0 + + +From af764483533ac1afc42a5c0f1c6b76c43be1d24d Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Tue, 15 Jan 2019 23:49:50 +0100 +Subject: [PATCH 2/3] shell: Add details for a system upgrade error + +Make the "internet access was required" error look the same as the rest +of the system upgrade errors, showing which distro version we were +trying to upgrade to. +--- + src/gs-shell.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/src/gs-shell.c b/src/gs-shell.c +index 7c2f86d81..7c97740fa 100644 +--- a/src/gs-shell.c ++++ b/src/gs-shell.c +@@ -1534,10 +1534,12 @@ gs_shell_show_event_upgrade (GsShell *shell, GsPluginEvent *event) + } + break; + case GS_PLUGIN_ERROR_NO_NETWORK: +- /* TRANSLATORS: failure text for the in-app notification */ +- g_string_append (str, _("Unable to upgrade: " +- "internet access was required but " +- "wasn’t available")); ++ /* TRANSLATORS: failure text for the in-app notification, ++ * where the %s is the distro name (e.g. "Fedora 25") */ ++ g_string_append_printf (str, _("Unable to upgrade to %s: " ++ "internet access was required but " ++ "wasn’t available"), ++ str_app); + buttons |= GS_SHELL_EVENT_BUTTON_NETWORK_SETTINGS; + break; + case GS_PLUGIN_ERROR_NO_SPACE: +-- +2.21.0 + + +From 0d3c47f69e7f6452412a0a3e6704106eefc0c658 Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Tue, 15 Jan 2019 23:55:22 +0100 +Subject: [PATCH 3/3] shell: Improve the logic when to show detailed error + messages + +Make sure we never have "Sorry, something went wrong" without actual +details what went wrong. +--- + src/gs-shell.c | 64 +++++++++++--------------------------------------- + 1 file changed, 14 insertions(+), 50 deletions(-) + +diff --git a/src/gs-shell.c b/src/gs-shell.c +index 7c97740fa..3eea95028 100644 +--- a/src/gs-shell.c ++++ b/src/gs-shell.c +@@ -990,16 +990,6 @@ gs_shell_get_title_from_app (GsApp *app) + return g_strdup_printf (_("“%s”"), gs_app_get_id (app)); + } + +-static gboolean +-gs_shell_show_detailed_error (GsShell *shell, const GError *error) +-{ +- if (error->code == GS_PLUGIN_ERROR_FAILED) +- return TRUE; +- if (error->code == GS_PLUGIN_ERROR_DOWNLOAD_FAILED) +- return TRUE; +- return FALSE; +-} +- + static gchar * + get_first_line (const gchar *str) + { +@@ -1055,6 +1045,7 @@ gs_shell_show_event_refresh (GsShell *shell, GsPluginEvent *event) + /* TRANSLATORS: failure text for the in-app notification */ + g_string_append (str, _("Unable to download updates")); + } ++ gs_shell_append_detailed_error (shell, str, error); + break; + case GS_PLUGIN_ERROR_NO_NETWORK: + /* TRANSLATORS: failure text for the in-app notification */ +@@ -1106,6 +1097,7 @@ gs_shell_show_event_refresh (GsShell *shell, GsPluginEvent *event) + /* TRANSLATORS: failure text for the in-app notification */ + g_string_append (str, _("Unable to get list of updates")); + } ++ gs_shell_append_detailed_error (shell, str, error); + break; + } + if (str->len == 0) +@@ -1121,10 +1113,6 @@ gs_shell_show_event_refresh (GsShell *shell, GsPluginEvent *event) + } + } + +- /* add extra debugging for debug builds */ +- if (gs_shell_show_detailed_error (shell, error)) +- gs_shell_append_detailed_error (shell, str, error); +- + /* show in-app notification */ + gs_shell_show_event_app_notify (shell, str->str, buttons); + return TRUE; +@@ -1173,15 +1161,12 @@ gs_shell_show_event_purchase (GsShell *shell, GsPluginEvent *event) + /* TRANSLATORS: failure text for the in-app notification, + * where the %s is the application name (e.g. "GIMP") */ + g_string_append_printf (str, _("Unable to purchase %s"), str_app); ++ gs_shell_append_detailed_error (shell, str, error); + break; + } + if (str->len == 0) + return FALSE; + +- /* add extra debugging for debug builds */ +- if (gs_shell_show_detailed_error (shell, error)) +- gs_shell_append_detailed_error (shell, str, error); +- + /* show in-app notification */ + gs_shell_show_event_app_notify (shell, str->str, GS_SHELL_EVENT_BUTTON_NONE); + return TRUE; +@@ -1218,6 +1203,7 @@ gs_shell_show_event_install (GsShell *shell, GsPluginEvent *event) + "as download failed"), + str_app); + } ++ gs_shell_append_detailed_error (shell, str, error); + break; + case GS_PLUGIN_ERROR_NOT_SUPPORTED: + if (origin != NULL) { +@@ -1319,6 +1305,7 @@ gs_shell_show_event_install (GsShell *shell, GsPluginEvent *event) + /* TRANSLATORS: failure text for the in-app notification, + * where the %s is the application name (e.g. "GIMP") */ + g_string_append_printf (str, _("Unable to install %s"), str_app); ++ gs_shell_append_detailed_error (shell, str, error); + break; + } + if (str->len == 0) +@@ -1334,10 +1321,6 @@ gs_shell_show_event_install (GsShell *shell, GsPluginEvent *event) + } + } + +- /* add extra debugging for debug builds */ +- if (gs_shell_show_detailed_error (shell, error)) +- gs_shell_append_detailed_error (shell, str, error); +- + /* show in-app notification */ + gs_shell_show_event_app_notify (shell, str->str, buttons); + return TRUE; +@@ -1384,6 +1367,7 @@ gs_shell_show_event_update (GsShell *shell, GsPluginEvent *event) + /* TRANSLATORS: failure text for the in-app notification */ + g_string_append_printf (str, _("Unable to install updates as download failed")); + } ++ gs_shell_append_detailed_error (shell, str, error); + break; + case GS_PLUGIN_ERROR_NO_NETWORK: + /* TRANSLATORS: failure text for the in-app notification */ +@@ -1479,6 +1463,7 @@ gs_shell_show_event_update (GsShell *shell, GsPluginEvent *event) + /* TRANSLATORS: failure text for the in-app notification */ + g_string_append_printf (str, _("Unable to install updates")); + } ++ gs_shell_append_detailed_error (shell, str, error); + break; + } + if (str->len == 0) +@@ -1494,10 +1479,6 @@ gs_shell_show_event_update (GsShell *shell, GsPluginEvent *event) + } + } + +- /* add extra debugging for debug builds */ +- if (gs_shell_show_detailed_error (shell, error)) +- gs_shell_append_detailed_error (shell, str, error); +- + /* show in-app notification */ + gs_shell_show_event_app_notify (shell, str->str, buttons); + return TRUE; +@@ -1532,6 +1513,7 @@ gs_shell_show_event_upgrade (GsShell *shell, GsPluginEvent *event) + "as download failed"), + str_app); + } ++ gs_shell_append_detailed_error (shell, str, error); + break; + case GS_PLUGIN_ERROR_NO_NETWORK: + /* TRANSLATORS: failure text for the in-app notification, +@@ -1585,6 +1567,7 @@ gs_shell_show_event_upgrade (GsShell *shell, GsPluginEvent *event) + /* TRANSLATORS: failure text for the in-app notification, + * where the %s is the distro name (e.g. "Fedora 25") */ + g_string_append_printf (str, _("Unable to upgrade to %s"), str_app); ++ gs_shell_append_detailed_error (shell, str, error); + break; + } + if (str->len == 0) +@@ -1600,10 +1583,6 @@ gs_shell_show_event_upgrade (GsShell *shell, GsPluginEvent *event) + } + } + +- /* add extra debugging for debug builds */ +- if (gs_shell_show_detailed_error (shell, error)) +- gs_shell_append_detailed_error (shell, str, error); +- + /* show in-app notification */ + gs_shell_show_event_app_notify (shell, str->str, buttons); + return TRUE; +@@ -1658,6 +1637,7 @@ gs_shell_show_event_remove (GsShell *shell, GsPluginEvent *event) + /* TRANSLATORS: failure text for the in-app notification, + * where the %s is the application name (e.g. "GIMP") */ + g_string_append_printf (str, _("Unable to remove %s"), str_app); ++ gs_shell_append_detailed_error (shell, str, error); + break; + } + if (str->len == 0) +@@ -1673,10 +1653,6 @@ gs_shell_show_event_remove (GsShell *shell, GsPluginEvent *event) + } + } + +- /* add extra debugging for debug builds */ +- if (gs_shell_show_detailed_error (shell, error)) +- gs_shell_append_detailed_error (shell, str, error); +- + /* show in-app notification */ + gs_shell_show_event_app_notify (shell, str->str, buttons); + return TRUE; +@@ -1722,6 +1698,7 @@ gs_shell_show_event_launch (GsShell *shell, GsPluginEvent *event) + return FALSE; + /* TRANSLATORS: we failed to get a proper error code */ + g_string_append (str, _("Sorry, something went wrong")); ++ gs_shell_append_detailed_error (shell, str, error); + break; + } + if (str->len == 0) +@@ -1737,10 +1714,6 @@ gs_shell_show_event_launch (GsShell *shell, GsPluginEvent *event) + } + } + +- /* add extra debugging for debug builds */ +- if (gs_shell_show_detailed_error (shell, error)) +- gs_shell_append_detailed_error (shell, str, error); +- + /* show in-app notification */ + gs_shell_show_event_app_notify (shell, str->str, buttons); + return TRUE; +@@ -1776,15 +1749,12 @@ gs_shell_show_event_file_to_app (GsShell *shell, GsPluginEvent *event) + return FALSE; + /* TRANSLATORS: we failed to get a proper error code */ + g_string_append (str, _("Sorry, something went wrong")); ++ gs_shell_append_detailed_error (shell, str, error); + break; + } + if (str->len == 0) + return FALSE; + +- /* add extra debugging for debug builds */ +- if (gs_shell_show_detailed_error (shell, error)) +- gs_shell_append_detailed_error (shell, str, error); +- + /* show in-app notification */ + gs_shell_show_event_app_notify (shell, str->str, buttons); + return TRUE; +@@ -1820,15 +1790,12 @@ gs_shell_show_event_url_to_app (GsShell *shell, GsPluginEvent *event) + return FALSE; + /* TRANSLATORS: we failed to get a proper error code */ + g_string_append (str, _("Sorry, something went wrong")); ++ gs_shell_append_detailed_error (shell, str, error); + break; + } + if (str->len == 0) + return FALSE; + +- /* add extra debugging for debug builds */ +- if (gs_shell_show_detailed_error (shell, error)) +- g_string_append_printf (str, "\n%s", error->message); +- + /* show in-app notification */ + gs_shell_show_event_app_notify (shell, str->str, buttons); + return TRUE; +@@ -1890,6 +1857,7 @@ gs_shell_show_event_fallback (GsShell *shell, GsPluginEvent *event) + return FALSE; + /* TRANSLATORS: we failed to get a proper error code */ + g_string_append (str, _("Sorry, something went wrong")); ++ gs_shell_append_detailed_error (shell, str, error); + break; + } + if (str->len == 0) +@@ -1905,10 +1873,6 @@ gs_shell_show_event_fallback (GsShell *shell, GsPluginEvent *event) + } + } + +- /* add extra debugging for debug builds */ +- if (gs_shell_show_detailed_error (shell, error)) +- gs_shell_append_detailed_error (shell, str, error); +- + /* show in-app notification */ + gs_shell_show_event_app_notify (shell, str->str, buttons); + return TRUE; +-- +2.21.0 + diff --git a/gnome-software.spec b/gnome-software.spec index f644ae8..46be744 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -11,7 +11,7 @@ Name: gnome-software Version: 3.30.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -21,6 +21,9 @@ Source0: https://download.gnome.org/sources/gnome-software/3.30/%{name}-%{vers # libappstream-glib-0.7.14-3.fc29. Patch0: 0001-Lower-as_utils_vercmp_full-version-check-for-Fedora.patch Patch1: 0001-Lower-AsStore-new-API-version-checks-for-Fedora.patch +# Various fixes to error messages to avoid the dreaded "Unable to update '(null)'" error +# and add some more context. Backported from upstream master. +Patch2: gnome-software-3-30-error-message-fixes.patch BuildRequires: gcc BuildRequires: gettext @@ -226,6 +229,10 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_mandir}/man1/gnome-software-editor.1* %changelog +* Mon Feb 25 2019 Kalev Lember - 3.30.6-2 +- Backport various fixes to error messages to avoid the dreaded + "Unable to update '(null)'" error + * Tue Dec 18 2018 Kalev Lember - 3.30.6-1 - Update to 3.30.6 From e7fdb4825ea2fcf88536a05cefb2cf7724a34532 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Sun, 28 Apr 2019 18:55:38 +0200 Subject: [PATCH 10/12] Add artwork for F30 upgrades --- .gitignore | 1 + gnome-software.spec | 12 +++++++++++- sources | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0e915ba..3885304 100644 --- a/.gitignore +++ b/.gitignore @@ -98,3 +98,4 @@ /gnome-software-3.30.3.tar.xz /gnome-software-3.30.5.tar.xz /gnome-software-3.30.6.tar.xz +/f30.png diff --git a/gnome-software.spec b/gnome-software.spec index 46be744..96bf832 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -11,12 +11,14 @@ Name: gnome-software Version: 3.30.6 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A software center for GNOME License: GPLv2+ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/3.30/%{name}-%{version}.tar.xz +# /usr/share/backgrounds/f30/default/wide/f30.png from f30-backgrounds-base +Source1: f30.png # Lower appstream-glib version check as we have the required new API backported to # libappstream-glib-0.7.14-3.fc29. Patch0: 0001-Lower-as_utils_vercmp_full-version-check-for-Fedora.patch @@ -140,6 +142,10 @@ cat >> %{buildroot}%{_datadir}/glib-2.0/schemas/org.gnome.software-fedora.gschem official-repos = [ 'fedora', 'fedora-debuginfo', 'fedora-source', 'koji-override-0', 'koji-override-1', 'rawhide', 'rawhide-debuginfo', 'rawhide-source', 'updates', 'updates-debuginfo', 'updates-source', 'updates-testing', 'updates-testing-debuginfo', 'updates-testing-source', 'fedora-modular', 'fedora-modular-debuginfo', 'fedora-modular-source', 'rawhide-modular', 'rawhide-modular-debuginfo', 'rawhide-modular-source' ] FOE +# Install upgrade background image +mkdir -p %{buildroot}%{_datadir}/gnome-software/backgrounds +cp -a %{SOURCE1} %{buildroot}%{_datadir}/gnome-software/backgrounds/ + %find_lang %name --with-gnome %check @@ -155,6 +161,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gnome-software/*.png %{_mandir}/man1/gnome-software.1.gz %{_datadir}/icons/hicolor/*/apps/* +%{_datadir}/gnome-software/backgrounds/ %{_datadir}/gnome-software/featured-*.svg %{_datadir}/gnome-software/featured-*.jpg %{_datadir}/metainfo/org.gnome.Software.appdata.xml @@ -229,6 +236,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_mandir}/man1/gnome-software-editor.1* %changelog +* Sun Apr 28 2019 Kalev Lember - 3.30.6-3 +- Add artwork for F30 upgrades + * Mon Feb 25 2019 Kalev Lember - 3.30.6-2 - Backport various fixes to error messages to avoid the dreaded "Unable to update '(null)'" error diff --git a/sources b/sources index e41e805..7ce60a9 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (gnome-software-3.30.6.tar.xz) = dd98e9e61469fc5566ab569f09bdc06ccb5812a236e305185b911c70364e2983f257e939aed0bb61778163084fb5628d63ff6bd5f056d4a7626a2e771ad6426a +SHA512 (f30.png) = 0e90083bda910c13ca9c08b8cde09ffdc8cf9176d84406539235ed3da71ca8bdf5342bf0dfbbd74f6052dffc8c8035e03c6f7ed4d578fa0e84af43e6993df32f From 913b096912671d62421f9ecc1667a33d7ab48b49 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 7 May 2019 14:26:59 +0200 Subject: [PATCH 11/12] Fix distro upgrade progress bar to actually work --- ...rogress-marshalling-for-upgrade_down.patch | 123 ++++++++++++++++++ gnome-software.spec | 7 +- 2 files changed, 129 insertions(+), 1 deletion(-) create mode 100644 0001-packagekit-Fix-progress-marshalling-for-upgrade_down.patch diff --git a/0001-packagekit-Fix-progress-marshalling-for-upgrade_down.patch b/0001-packagekit-Fix-progress-marshalling-for-upgrade_down.patch new file mode 100644 index 0000000..9269ccc --- /dev/null +++ b/0001-packagekit-Fix-progress-marshalling-for-upgrade_down.patch @@ -0,0 +1,123 @@ +From ece9a68becd6441d238f23acd2a1b156243fa7b6 Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Tue, 7 May 2019 08:22:53 +0200 +Subject: [PATCH] packagekit: Fix progress marshalling for upgrade_download and + refresh + +The new GsPackageKitHelper class introduced in mega-commit 37103e6 only +handled progress marshalling when downloading a list of packages, but +not when the PK transaction is one big monolithic operation that only +has a single GsApp associated, such as when downloading all of the +distro upgrades, or when refreshing the cache. + +This commit adds a way to explicitly add a GsApp to GsPackageKitHelper +to use for marshalling progress in these cases. +--- + plugins/packagekit/gs-packagekit-helper.c | 13 ++++++++++++- + plugins/packagekit/gs-packagekit-helper.h | 3 +++ + plugins/packagekit/gs-plugin-packagekit-refresh.c | 2 +- + plugins/packagekit/gs-plugin-packagekit-upgrade.c | 2 +- + 4 files changed, 17 insertions(+), 3 deletions(-) + +diff --git a/plugins/packagekit/gs-packagekit-helper.c b/plugins/packagekit/gs-packagekit-helper.c +index a292e0068..39c026c3e 100644 +--- a/plugins/packagekit/gs-packagekit-helper.c ++++ b/plugins/packagekit/gs-packagekit-helper.c +@@ -1,6 +1,7 @@ + /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2016-2018 Richard Hughes ++ * Copyright (C) 2019 Kalev Lember + * + * Licensed under the GNU General Public License Version 2 + * +@@ -29,6 +30,7 @@ + struct _GsPackagekitHelper { + GObject parent_instance; + GHashTable *apps; ++ GsApp *progress_app; + GsPlugin *plugin; + }; + +@@ -43,7 +45,9 @@ gs_packagekit_helper_cb (PkProgress *progress, PkProgressType type, gpointer use + GsApp *app = NULL; + + /* optional */ +- if (package_id != NULL) ++ if (self->progress_app != NULL) ++ app = self->progress_app; ++ else if (package_id != NULL) + app = gs_packagekit_helper_get_app_by_id (self, package_id); + + if (type == PK_PROGRESS_TYPE_STATUS) { +@@ -79,6 +83,12 @@ gs_packagekit_helper_add_app (GsPackagekitHelper *self, GsApp *app) + } + } + ++void ++gs_packagekit_helper_set_progress_app (GsPackagekitHelper *self, GsApp *progress_app) ++{ ++ g_set_object (&self->progress_app, progress_app); ++} ++ + GsPlugin * + gs_packagekit_helper_get_plugin (GsPackagekitHelper *self) + { +@@ -104,6 +114,7 @@ gs_packagekit_helper_finalize (GObject *object) + self = GS_PACKAGEKIT_HELPER (object); + + g_object_unref (self->plugin); ++ g_clear_object (&self->progress_app); + g_hash_table_unref (self->apps); + + G_OBJECT_CLASS (gs_packagekit_helper_parent_class)->finalize (object); +diff --git a/plugins/packagekit/gs-packagekit-helper.h b/plugins/packagekit/gs-packagekit-helper.h +index 3b5263c0a..b18b8229b 100644 +--- a/plugins/packagekit/gs-packagekit-helper.h ++++ b/plugins/packagekit/gs-packagekit-helper.h +@@ -1,6 +1,7 @@ + /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2016-2018 Richard Hughes ++ * Copyright (C) 2019 Kalev Lember + * + * Licensed under the GNU General Public License Version 2 + * +@@ -36,6 +37,8 @@ GsPackagekitHelper *gs_packagekit_helper_new (GsPlugin *plugin); + GsPlugin *gs_packagekit_helper_get_plugin (GsPackagekitHelper *self); + void gs_packagekit_helper_add_app (GsPackagekitHelper *self, + GsApp *app); ++void gs_packagekit_helper_set_progress_app (GsPackagekitHelper *self, ++ GsApp *progress_app); + GsApp *gs_packagekit_helper_get_app_by_id (GsPackagekitHelper *progress, + const gchar *package_id); + void gs_packagekit_helper_cb (PkProgress *progress, +diff --git a/plugins/packagekit/gs-plugin-packagekit-refresh.c b/plugins/packagekit/gs-plugin-packagekit-refresh.c +index ff893daaf..a8093de2c 100644 +--- a/plugins/packagekit/gs-plugin-packagekit-refresh.c ++++ b/plugins/packagekit/gs-plugin-packagekit-refresh.c +@@ -156,7 +156,7 @@ gs_plugin_refresh (GsPlugin *plugin, + + /* refresh the metadata */ + gs_plugin_status_update (plugin, NULL, GS_PLUGIN_STATUS_WAITING); +- gs_packagekit_helper_add_app (helper, app_dl); ++ gs_packagekit_helper_set_progress_app (helper, app_dl); + results = pk_client_refresh_cache (PK_CLIENT (priv->task), + FALSE /* force */, + cancellable, +diff --git a/plugins/packagekit/gs-plugin-packagekit-upgrade.c b/plugins/packagekit/gs-plugin-packagekit-upgrade.c +index 63175bec3..38de93d55 100644 +--- a/plugins/packagekit/gs-plugin-packagekit-upgrade.c ++++ b/plugins/packagekit/gs-plugin-packagekit-upgrade.c +@@ -77,7 +77,7 @@ gs_plugin_app_upgrade_download (GsPlugin *plugin, + + /* ask PK to download enough packages to upgrade the system */ + gs_app_set_state (app, AS_APP_STATE_INSTALLING); +- gs_packagekit_helper_add_app (helper, app); ++ gs_packagekit_helper_set_progress_app (helper, app); + results = pk_task_upgrade_system_sync (priv->task, + gs_app_get_version (app), + PK_UPGRADE_KIND_ENUM_COMPLETE, +-- +2.21.0 + diff --git a/gnome-software.spec b/gnome-software.spec index 96bf832..d1e4639 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -11,7 +11,7 @@ Name: gnome-software Version: 3.30.6 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -26,6 +26,8 @@ Patch1: 0001-Lower-AsStore-new-API-version-checks-for-Fedora.patch # Various fixes to error messages to avoid the dreaded "Unable to update '(null)'" error # and add some more context. Backported from upstream master. Patch2: gnome-software-3-30-error-message-fixes.patch +# Backported from upstream master +Patch3: 0001-packagekit-Fix-progress-marshalling-for-upgrade_down.patch BuildRequires: gcc BuildRequires: gettext @@ -236,6 +238,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_mandir}/man1/gnome-software-editor.1* %changelog +* Tue May 07 2019 Kalev Lember - 3.30.6-4 +- Fix distro upgrade progress bar to actually work + * Sun Apr 28 2019 Kalev Lember - 3.30.6-3 - Add artwork for F30 upgrades From 5da59d6a0c04f02e06119331757636de494e4cfd Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Wed, 18 Sep 2019 12:42:52 +0200 Subject: [PATCH 12/12] Add artwork for F31 upgrades --- .gitignore | 1 + gnome-software.spec | 8 +++++++- sources | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3885304..12834a6 100644 --- a/.gitignore +++ b/.gitignore @@ -99,3 +99,4 @@ /gnome-software-3.30.5.tar.xz /gnome-software-3.30.6.tar.xz /f30.png +/f31.png diff --git a/gnome-software.spec b/gnome-software.spec index d1e4639..e7cc2ba 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -11,7 +11,7 @@ Name: gnome-software Version: 3.30.6 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -19,6 +19,8 @@ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/3.30/%{name}-%{version}.tar.xz # /usr/share/backgrounds/f30/default/wide/f30.png from f30-backgrounds-base Source1: f30.png +# /usr/share/backgrounds/f31/default/wide/f31.png from f31-backgrounds-base +Source2: f31.png # Lower appstream-glib version check as we have the required new API backported to # libappstream-glib-0.7.14-3.fc29. Patch0: 0001-Lower-as_utils_vercmp_full-version-check-for-Fedora.patch @@ -147,6 +149,7 @@ FOE # Install upgrade background image mkdir -p %{buildroot}%{_datadir}/gnome-software/backgrounds cp -a %{SOURCE1} %{buildroot}%{_datadir}/gnome-software/backgrounds/ +cp -a %{SOURCE2} %{buildroot}%{_datadir}/gnome-software/backgrounds/ %find_lang %name --with-gnome @@ -238,6 +241,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_mandir}/man1/gnome-software-editor.1* %changelog +* Wed Sep 18 2019 Kalev Lember - 3.30.6-5 +- Add artwork for F31 upgrades + * Tue May 07 2019 Kalev Lember - 3.30.6-4 - Fix distro upgrade progress bar to actually work diff --git a/sources b/sources index 7ce60a9..19601fc 100644 --- a/sources +++ b/sources @@ -1,2 +1,3 @@ SHA512 (gnome-software-3.30.6.tar.xz) = dd98e9e61469fc5566ab569f09bdc06ccb5812a236e305185b911c70364e2983f257e939aed0bb61778163084fb5628d63ff6bd5f056d4a7626a2e771ad6426a SHA512 (f30.png) = 0e90083bda910c13ca9c08b8cde09ffdc8cf9176d84406539235ed3da71ca8bdf5342bf0dfbbd74f6052dffc8c8035e03c6f7ed4d578fa0e84af43e6993df32f +SHA512 (f31.png) = 69e6c8291d93640d4d6f5d71c3a9e08f65a90c19c38b6036423c236063e68be03b68c2668aae6d8b0a03c7a24bf8ae8e108dfb2a9cd85b7bb232751b3e05bb0f