diff --git a/.gitignore b/.gitignore index c01a7d7..12834a6 100644 --- a/.gitignore +++ b/.gitignore @@ -91,3 +91,12 @@ /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 +/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 +/gnome-software-3.30.5.tar.xz +/gnome-software-3.30.6.tar.xz +/f30.png +/f31.png 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/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/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-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 0eff1e3..e7cc2ba 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -1,8 +1,8 @@ -%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 -%global appstream_glib_version 0.7.8 +%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,13 +10,26 @@ %global flatpak_version 0.9.4 Name: gnome-software -Version: 3.29.1 -Release: 2%{?dist} +Version: 3.30.6 +Release: 5%{?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 +# /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 +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 @@ -44,7 +57,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 +82,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 +107,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 +120,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 @@ -129,9 +143,14 @@ 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 +# 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 %check @@ -147,6 +166,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 @@ -221,6 +241,43 @@ 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 + +* 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 + +* 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 + +* 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 + +* 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 + +* 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 + * 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..19601fc 100644 --- a/sources +++ b/sources @@ -1 +1,3 @@ -SHA512 (gnome-software-3.29.1.tar.xz) = 505582ee5c1d20a9e75ee3a57288643b6ce5fa6bceb68d81d4306faeb0fefe32f5ce450f7f24a4189b4680c56f8a0eb7456191df8c3826113a6fa11934240225 +SHA512 (gnome-software-3.30.6.tar.xz) = dd98e9e61469fc5566ab569f09bdc06ccb5812a236e305185b911c70364e2983f257e939aed0bb61778163084fb5628d63ff6bd5f056d4a7626a2e771ad6426a +SHA512 (f30.png) = 0e90083bda910c13ca9c08b8cde09ffdc8cf9176d84406539235ed3da71ca8bdf5342bf0dfbbd74f6052dffc8c8035e03c6f7ed4d578fa0e84af43e6993df32f +SHA512 (f31.png) = 69e6c8291d93640d4d6f5d71c3a9e08f65a90c19c38b6036423c236063e68be03b68c2668aae6d8b0a03c7a24bf8ae8e108dfb2a9cd85b7bb232751b3e05bb0f