[gnome-settings-daemon] updates: Never show the user a message about a cancelled transaction
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] updates: Never show the user a message about a cancelled transaction
- Date: Mon, 8 Oct 2012 13:29:06 +0000 (UTC)
commit 7901a81c0736c3498439cf73aefb95951e297854
Author: Richard Hughes <richard hughsie com>
Date: Mon Oct 8 14:27:19 2012 +0100
updates: Never show the user a message about a cancelled transaction
This can happen if the user issues lots of commands using the native packaging
tool (e.g. yum) on the command line whilst gnome-settings-daemon is trying to
download either the updates list or the offline update packages themselves.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=863856
plugins/updates/gsd-updates-manager.c | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
---
diff --git a/plugins/updates/gsd-updates-manager.c b/plugins/updates/gsd-updates-manager.c
index 84003b5..c9feb4b 100644
--- a/plugins/updates/gsd-updates-manager.c
+++ b/plugins/updates/gsd-updates-manager.c
@@ -692,7 +692,15 @@ package_download_finished_cb (GObject *object,
g_warning ("failed to download: %s, %s",
pk_error_enum_to_string (pk_error_get_code (error_code)),
pk_error_get_details (error_code));
- notify_failed_get_updates_maybe (manager);
+ switch (pk_error_get_code (error_code)) {
+ case PK_ERROR_ENUM_CANCELLED_PRIORITY:
+ case PK_ERROR_ENUM_TRANSACTION_CANCELLED:
+ g_debug ("ignoring error");
+ break;
+ default:
+ notify_failed_get_updates_maybe (manager);
+ break;
+ }
goto out;
}
@@ -771,7 +779,15 @@ get_updates_finished_cb (GObject *object,
g_warning ("failed to get updates: %s, %s",
pk_error_enum_to_string (pk_error_get_code (error_code)),
pk_error_get_details (error_code));
- notify_failed_get_updates_maybe (manager);
+ switch (pk_error_get_code (error_code)) {
+ case PK_ERROR_ENUM_CANCELLED_PRIORITY:
+ case PK_ERROR_ENUM_TRANSACTION_CANCELLED:
+ g_debug ("ignoring error");
+ break;
+ default:
+ notify_failed_get_updates_maybe (manager);
+ break;
+ }
goto out;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]