[gnome-software/wip/hughsie/GsPluginEvent: 23/24] packagekit: Use the new ERROR_DOWNLOAD_FAILED
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/hughsie/GsPluginEvent: 23/24] packagekit: Use the new ERROR_DOWNLOAD_FAILED
- Date: Wed, 7 Sep 2016 21:22:49 +0000 (UTC)
commit 71b601d19a13a4703f5c91f9d29747d3deb6a629
Author: Richard Hughes <richard hughsie com>
Date: Wed Sep 7 21:38:52 2016 +0100
packagekit: Use the new ERROR_DOWNLOAD_FAILED
src/plugins/gs-plugin-packagekit-local.c | 4 +++-
src/plugins/gs-plugin-packagekit.c | 8 ++++++--
src/plugins/packagekit-common.c | 8 +++++---
3 files changed, 14 insertions(+), 6 deletions(-)
---
diff --git a/src/plugins/gs-plugin-packagekit-local.c b/src/plugins/gs-plugin-packagekit-local.c
index 1a42913..4ed8f81 100644
--- a/src/plugins/gs-plugin-packagekit-local.c
+++ b/src/plugins/gs-plugin-packagekit-local.c
@@ -136,8 +136,10 @@ gs_plugin_packagekit_refresh_guess_app_id (GsPlugin *plugin,
cancellable,
gs_plugin_packagekit_progress_cb, &data,
error);
- if (!gs_plugin_packagekit_results_valid (results, error))
+ if (!gs_plugin_packagekit_results_valid (results, error)) {
+ gs_plugin_error_add_unique_id (error, app);
return FALSE;
+ }
array = pk_results_get_files_array (results);
if (array->len == 0) {
g_set_error (error,
diff --git a/src/plugins/gs-plugin-packagekit.c b/src/plugins/gs-plugin-packagekit.c
index 0e9d68b..2e7c6ed 100644
--- a/src/plugins/gs-plugin-packagekit.c
+++ b/src/plugins/gs-plugin-packagekit.c
@@ -239,8 +239,10 @@ gs_plugin_app_source_enable (GsPlugin *plugin,
cancellable,
gs_plugin_packagekit_progress_cb, &data,
error);
- if (!gs_plugin_packagekit_results_valid (results, error))
+ if (!gs_plugin_packagekit_results_valid (results, error)) {
+ gs_plugin_error_add_unique_id (error, app);
return FALSE;
+ }
return TRUE;
}
@@ -439,8 +441,10 @@ gs_plugin_app_source_disable (GsPlugin *plugin,
cancellable,
gs_plugin_packagekit_progress_cb, &data,
error);
- if (!gs_plugin_packagekit_results_valid (results, error))
+ if (!gs_plugin_packagekit_results_valid (results, error)) {
+ gs_plugin_error_add_unique_id (error, app);
return FALSE;
+ }
return TRUE;
}
diff --git a/src/plugins/packagekit-common.c b/src/plugins/packagekit-common.c
index 2aeedef..552698a 100644
--- a/src/plugins/packagekit-common.c
+++ b/src/plugins/packagekit-common.c
@@ -117,13 +117,15 @@ gs_plugin_packagekit_convert_gerror (GError **error)
case PK_ERROR_ENUM_PACKAGE_INSTALL_BLOCKED:
error_tmp->code = GS_PLUGIN_ERROR_NOT_SUPPORTED;
break;
- case PK_ERROR_ENUM_CANNOT_FETCH_SOURCES:
case PK_ERROR_ENUM_NO_CACHE:
- case PK_ERROR_ENUM_NO_MORE_MIRRORS_TO_TRY:
case PK_ERROR_ENUM_NO_NETWORK:
- case PK_ERROR_ENUM_PACKAGE_DOWNLOAD_FAILED:
error_tmp->code = GS_PLUGIN_ERROR_NO_NETWORK;
break;
+ case PK_ERROR_ENUM_PACKAGE_DOWNLOAD_FAILED:
+ case PK_ERROR_ENUM_NO_MORE_MIRRORS_TO_TRY:
+ case PK_ERROR_ENUM_CANNOT_FETCH_SOURCES:
+ error_tmp->code = GS_PLUGIN_ERROR_DOWNLOAD_FAILED;
+ break;
case PK_ERROR_ENUM_BAD_GPG_SIGNATURE:
case PK_ERROR_ENUM_CANNOT_INSTALL_REPO_UNSIGNED:
case PK_ERROR_ENUM_CANNOT_UPDATE_REPO_UNSIGNED:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]