[gnome-software] trivial: Convert some ERROR_FAILED to ERROR_NOT_SUPPORTED



commit 7d698beb1a0b647f586c58af711eb8f81b8c3d54
Author: Richard Hughes <richard hughsie com>
Date:   Wed Sep 7 15:13:05 2016 +0100

    trivial: Convert some ERROR_FAILED to ERROR_NOT_SUPPORTED

 src/gs-plugin-loader.c                     |    2 +-
 src/plugins/gs-plugin-appstream.c          |    2 +-
 src/plugins/gs-plugin-dpkg.c               |    2 +-
 src/plugins/gs-plugin-epiphany.c           |    2 +-
 src/plugins/gs-plugin-fwupd.c              |    2 +-
 src/plugins/gs-plugin-icons.c              |   10 +++++-----
 src/plugins/gs-plugin-packagekit-history.c |    2 +-
 src/plugins/gs-plugin-packagekit.c         |    2 +-
 src/plugins/gs-plugin-rpm.c                |    2 +-
 src/plugins/gs-plugin-shell-extensions.c   |    2 +-
 src/plugins/gs-plugin-snap.c               |    4 ++--
 src/plugins/gs-snapd.c                     |    4 ++--
 12 files changed, 18 insertions(+), 18 deletions(-)
---
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index 3584d59..8005871 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -2384,7 +2384,7 @@ gs_plugin_loader_get_categories_thread_cb (GTask *task,
        if (state->catlist->len == 0) {
                g_task_return_new_error (task,
                                         GS_PLUGIN_ERROR,
-                                        GS_PLUGIN_ERROR_FAILED,
+                                        GS_PLUGIN_ERROR_NOT_SUPPORTED,
                                         "no categories to show");
                return;
        }
diff --git a/src/plugins/gs-plugin-appstream.c b/src/plugins/gs-plugin-appstream.c
index e1d6490..2858e03 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -252,7 +252,7 @@ gs_plugin_setup (GsPlugin *plugin, GCancellable *cancellable, GError **error)
                g_warning ("No AppStream data, try 'make install-sample-data' in data/");
                g_set_error (error,
                             GS_PLUGIN_ERROR,
-                            GS_PLUGIN_ERROR_FAILED,
+                            GS_PLUGIN_ERROR_NOT_SUPPORTED,
                             "No AppStream data found");
                return FALSE;
        }
diff --git a/src/plugins/gs-plugin-dpkg.c b/src/plugins/gs-plugin-dpkg.c
index b4836aa..bb82fcc 100644
--- a/src/plugins/gs-plugin-dpkg.c
+++ b/src/plugins/gs-plugin-dpkg.c
@@ -81,7 +81,7 @@ gs_plugin_file_to_app (GsPlugin *plugin,
        if (g_strv_length (tokens) < 5) {
                g_set_error (error,
                             GS_PLUGIN_ERROR,
-                            GS_PLUGIN_ERROR_FAILED,
+                            GS_PLUGIN_ERROR_NOT_SUPPORTED,
                             "dpkg-deb output format incorrect:\n\"%s\"\n", output);
                return FALSE;
        }
diff --git a/src/plugins/gs-plugin-epiphany.c b/src/plugins/gs-plugin-epiphany.c
index c1d0324..ccd3502 100644
--- a/src/plugins/gs-plugin-epiphany.c
+++ b/src/plugins/gs-plugin-epiphany.c
@@ -113,7 +113,7 @@ gs_plugin_app_install (GsPlugin *plugin, GsApp *app,
        if (icons->len == 0) {
                g_set_error (error,
                             GS_PLUGIN_ERROR,
-                            GS_PLUGIN_ERROR_FAILED,
+                            GS_PLUGIN_ERROR_NOT_SUPPORTED,
                             "no icons for %s",
                             gs_app_get_id (app));
                return FALSE;
diff --git a/src/plugins/gs-plugin-fwupd.c b/src/plugins/gs-plugin-fwupd.c
index 23661c9..c861e63 100644
--- a/src/plugins/gs-plugin-fwupd.c
+++ b/src/plugins/gs-plugin-fwupd.c
@@ -398,7 +398,7 @@ gs_plugin_add_update_app (GsPlugin *plugin,
        if (gs_app_get_state (app) != AS_APP_STATE_UPDATABLE_LIVE) {
                g_set_error (error,
                             GS_PLUGIN_ERROR,
-                            GS_PLUGIN_ERROR_FAILED,
+                            GS_PLUGIN_ERROR_NOT_SUPPORTED,
                             "%s [%s] cannot be updated",
                             gs_app_get_name (app), gs_app_get_id (app));
                return FALSE;
diff --git a/src/plugins/gs-plugin-icons.c b/src/plugins/gs-plugin-icons.c
index 2054288..92225cb 100644
--- a/src/plugins/gs-plugin-icons.c
+++ b/src/plugins/gs-plugin-icons.c
@@ -79,7 +79,7 @@ gs_plugin_icons_download (GsPlugin *plugin,
        if (msg == NULL) {
                g_set_error (error,
                             GS_PLUGIN_ERROR,
-                            GS_PLUGIN_ERROR_FAILED,
+                            GS_PLUGIN_ERROR_NOT_SUPPORTED,
                             "%s is not a valid URL", uri);
                return FALSE;
        }
@@ -121,7 +121,7 @@ gs_plugin_icons_load_local (GsPlugin *plugin, AsIcon *icon, GError **error)
        if (as_icon_get_filename (icon) == NULL) {
                g_set_error_literal (error,
                                     GS_PLUGIN_ERROR,
-                                    GS_PLUGIN_ERROR_FAILED,
+                                    GS_PLUGIN_ERROR_NOT_SUPPORTED,
                                     "icon has no filename");
                return NULL;
        }
@@ -152,7 +152,7 @@ gs_plugin_icons_load_remote (GsPlugin *plugin, AsIcon *icon, GError **error)
        if (as_icon_get_url (icon) == NULL) {
                g_set_error_literal (error,
                                     GS_PLUGIN_ERROR,
-                                    GS_PLUGIN_ERROR_FAILED,
+                                    GS_PLUGIN_ERROR_NOT_SUPPORTED,
                                     "icon has no URL");
                return NULL;
        }
@@ -222,7 +222,7 @@ gs_plugin_icons_load_stock (GsPlugin *plugin, AsIcon *icon, GError **error)
        if (as_icon_get_name (icon) == NULL) {
                g_set_error_literal (error,
                                     GS_PLUGIN_ERROR,
-                                    GS_PLUGIN_ERROR_FAILED,
+                                    GS_PLUGIN_ERROR_NOT_SUPPORTED,
                                     "icon has no name");
                return NULL;
        }
@@ -286,7 +286,7 @@ gs_plugin_refine_app (GsPlugin *plugin,
                default:
                        g_set_error (&error_local,
                                     GS_PLUGIN_ERROR,
-                                    GS_PLUGIN_ERROR_FAILED,
+                                    GS_PLUGIN_ERROR_NOT_SUPPORTED,
                                     "icon kind '%s' unknown",
                                     as_icon_kind_to_string (as_icon_get_kind (icon)));
                        break;
diff --git a/src/plugins/gs-plugin-packagekit-history.c b/src/plugins/gs-plugin-packagekit-history.c
index 267d41d..2b85a63 100644
--- a/src/plugins/gs-plugin-packagekit-history.c
+++ b/src/plugins/gs-plugin-packagekit-history.c
@@ -177,7 +177,7 @@ gs_plugin_packagekit_refine (GsPlugin *plugin,
                }
                g_set_error (error,
                             GS_PLUGIN_ERROR,
-                            GS_PLUGIN_ERROR_FAILED,
+                            GS_PLUGIN_ERROR_NOT_SUPPORTED,
                             "Failed to get history: %s",
                             error_local->message);
                return FALSE;
diff --git a/src/plugins/gs-plugin-packagekit.c b/src/plugins/gs-plugin-packagekit.c
index 55b4bfa..0e9d68b 100644
--- a/src/plugins/gs-plugin-packagekit.c
+++ b/src/plugins/gs-plugin-packagekit.c
@@ -405,7 +405,7 @@ gs_plugin_app_install (GsPlugin *plugin,
        default:
                g_set_error (error,
                             GS_PLUGIN_ERROR,
-                            GS_PLUGIN_ERROR_FAILED,
+                            GS_PLUGIN_ERROR_NOT_SUPPORTED,
                             "do not know how to install app in state %s",
                             as_app_state_to_string (gs_app_get_state (app)));
                return FALSE;
diff --git a/src/plugins/gs-plugin-rpm.c b/src/plugins/gs-plugin-rpm.c
index 974d8b0..9c2a724 100644
--- a/src/plugins/gs-plugin-rpm.c
+++ b/src/plugins/gs-plugin-rpm.c
@@ -79,7 +79,7 @@ gs_plugin_refine_app (GsPlugin *plugin,
        if (rc != 0) {
                g_set_error (error,
                             GS_PLUGIN_ERROR,
-                            GS_PLUGIN_ERROR_FAILED,
+                            GS_PLUGIN_ERROR_NOT_SUPPORTED,
                             "Failed to open rpmdb: %i", rc);
                return FALSE;
        }
diff --git a/src/plugins/gs-plugin-shell-extensions.c b/src/plugins/gs-plugin-shell-extensions.c
index fe9df98..5821bc9 100644
--- a/src/plugins/gs-plugin-shell-extensions.c
+++ b/src/plugins/gs-plugin-shell-extensions.c
@@ -790,7 +790,7 @@ gs_plugin_app_remove (GsPlugin *plugin,
                gs_app_set_state_recover (app);
                g_set_error (error,
                             GS_PLUGIN_ERROR,
-                            GS_PLUGIN_ERROR_FAILED,
+                            GS_PLUGIN_ERROR_NOT_SUPPORTED,
                             "failed to uninstall %s",
                             gs_app_get_id (app));
                return FALSE;
diff --git a/src/plugins/gs-plugin-snap.c b/src/plugins/gs-plugin-snap.c
index f613619..354072a 100644
--- a/src/plugins/gs-plugin-snap.c
+++ b/src/plugins/gs-plugin-snap.c
@@ -581,7 +581,7 @@ send_package_action (GsPlugin *plugin,
        if (g_strcmp0 (status, "Done") != 0) {
                g_set_error (error,
                             GS_PLUGIN_ERROR,
-                            GS_PLUGIN_ERROR_FAILED,
+                            GS_PLUGIN_ERROR_NOT_SUPPORTED,
                             "snapd operation finished with status %s", status);
                return FALSE;
        }
@@ -736,7 +736,7 @@ gs_plugin_auth_login (GsPlugin *plugin, GsAuth *auth,
                else {
                        g_set_error_literal (error,
                                             GS_PLUGIN_ERROR,
-                                            GS_PLUGIN_ERROR_FAILED,
+                                            GS_PLUGIN_ERROR_NOT_SUPPORTED,
                                             error_message);
                }
                return FALSE;
diff --git a/src/plugins/gs-snapd.c b/src/plugins/gs-snapd.c
index 82ec323..808ba55 100644
--- a/src/plugins/gs-snapd.c
+++ b/src/plugins/gs-snapd.c
@@ -53,7 +53,7 @@ open_snapd_socket (GCancellable *cancellable, GError **error)
        if (!socket) {
                g_set_error (error,
                             GS_PLUGIN_ERROR,
-                            GS_PLUGIN_ERROR_FAILED,
+                            GS_PLUGIN_ERROR_NOT_SUPPORTED,
                             "Unable to open snapd socket: %s",
                             error_local->message);
                return NULL;
@@ -62,7 +62,7 @@ open_snapd_socket (GCancellable *cancellable, GError **error)
        if (!g_socket_connect (socket, address, cancellable, &error_local)) {
                g_set_error (error,
                             GS_PLUGIN_ERROR,
-                            GS_PLUGIN_ERROR_FAILED,
+                            GS_PLUGIN_ERROR_NOT_SUPPORTED,
                             "Unable to connect snapd socket: %s",
                             error_local->message);
                g_object_unref (socket);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]