[gnome-software] trivial: Ignore non distro-upgrade kinds when downloading



commit a0b92abbd98d5e6ceb382b5b03dbf6730a57af33
Author: Richard Hughes <richard hughsie com>
Date:   Wed Sep 7 15:14:35 2016 +0100

    trivial: Ignore non distro-upgrade kinds when downloading

 src/plugins/gs-plugin-packagekit-upgrade.c |   14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)
---
diff --git a/src/plugins/gs-plugin-packagekit-upgrade.c b/src/plugins/gs-plugin-packagekit-upgrade.c
index b50c413..7d418ba 100644
--- a/src/plugins/gs-plugin-packagekit-upgrade.c
+++ b/src/plugins/gs-plugin-packagekit-upgrade.c
@@ -89,19 +89,13 @@ gs_plugin_app_upgrade_download (GsPlugin *plugin,
        if (g_strcmp0 (gs_app_get_management_plugin (app), "packagekit") != 0)
                return TRUE;
 
+       /* check is distro-upgrade */
+       if (gs_app_get_kind (app) != AS_APP_KIND_OS_UPGRADE)
+               return TRUE;
+
        data.app = app;
        data.plugin = plugin;
 
-       /* check is distro-upgrade */
-       if (gs_app_get_kind (app) != AS_APP_KIND_OS_UPGRADE) {
-               g_set_error (error,
-                            GS_PLUGIN_ERROR,
-                            GS_PLUGIN_ERROR_FAILED,
-                            "app %s is not a distro upgrade",
-                            gs_app_get_id (app));
-               return FALSE;
-       }
-
        /* ask PK to download enough packages to upgrade the system */
        gs_app_set_state (app, AS_APP_STATE_INSTALLING);
        results = pk_task_upgrade_system_sync (priv->task,


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