[gnome-software] Revert "packagekit: Implement repository enabling"



commit a13f829b1d58ba8a65dbfa210ef86378068a70cb
Author: Kalev Lember <klember redhat com>
Date:   Thu Jan 18 13:18:56 2018 +0100

    Revert "packagekit: Implement repository enabling"
    
    This broke installing rpmfusion-free-release package.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1535172
    
    This reverts commit 6daee0889b9080ea2a276767b555aa4437edddde.

 plugins/packagekit/gs-plugin-packagekit.c |   36 +----------------------------
 1 files changed, 1 insertions(+), 35 deletions(-)
---
diff --git a/plugins/packagekit/gs-plugin-packagekit.c b/plugins/packagekit/gs-plugin-packagekit.c
index 9bd7e6d..d40ba9f 100644
--- a/plugins/packagekit/gs-plugin-packagekit.c
+++ b/plugins/packagekit/gs-plugin-packagekit.c
@@ -210,34 +210,6 @@ gs_plugin_app_source_enable (GsPlugin *plugin,
        return TRUE;
 }
 
-static gboolean
-gs_plugin_repo_enable (GsPlugin *plugin,
-                       GsApp *repo,
-                       GCancellable *cancellable,
-                       GError **error)
-{
-       GsPluginData *priv = gs_plugin_get_data (plugin);
-       ProgressData data = { 0 };
-       g_autoptr(PkResults) results = NULL;
-
-       data.app = repo;
-       data.plugin = plugin;
-
-       /* do sync call */
-       gs_plugin_status_update (plugin, repo, GS_PLUGIN_STATUS_WAITING);
-       results = pk_client_repo_enable (PK_CLIENT (priv->task),
-                                        gs_app_get_id (repo),
-                                        TRUE,
-                                        cancellable,
-                                        gs_plugin_packagekit_progress_cb, &data,
-                                        error);
-       if (!gs_plugin_packagekit_results_valid (results, error)) {
-               gs_utils_error_add_unique_id (error, repo);
-               return FALSE;
-       }
-       return TRUE;
-}
-
 gboolean
 gs_plugin_app_install (GsPlugin *plugin,
                       GsApp *app,
@@ -263,19 +235,13 @@ gs_plugin_app_install (GsPlugin *plugin,
                       gs_plugin_get_name (plugin)) != 0)
                return TRUE;
 
-       /* enable repo */
-       if (gs_app_get_kind (app) == AS_APP_KIND_SOURCE) {
-               return gs_plugin_repo_enable (plugin, app,
-                                             cancellable, error);
-       }
-
        /* queue for install if installation needs the network */
        if (!gs_plugin_get_network_available (plugin)) {
                gs_app_set_state (app, AS_APP_STATE_QUEUED_FOR_INSTALL);
                return TRUE;
        }
 
-       /* enable the repo where the unavailable app is coming from */
+       /* we enable the repo */
        if (gs_app_get_state (app) == AS_APP_STATE_UNAVAILABLE) {
 
                /* get everything up front we need */


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