[gnome-software] packagekit: Make sure user activity doesn't cancel background downloads



commit 9e9d62d3d1013a3f35385253f95ff8a7d10f97d6
Author: Alan Jenkins <alan christopher jenkins gmail com>
Date:   Mon Sep 19 16:42:40 2016 +0100

    packagekit: Make sure user activity doesn't cancel background downloads
    
    Switch to using PkTask API which provides the resceduling-on-cancel
    feature. This fixes an issue where background update downloads get
    interrupted by user activity and don't resume until next day.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1314991

 plugins/packagekit/gs-plugin-packagekit-refresh.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/plugins/packagekit/gs-plugin-packagekit-refresh.c 
b/plugins/packagekit/gs-plugin-packagekit-refresh.c
index 729102d..748ab54 100644
--- a/plugins/packagekit/gs-plugin-packagekit-refresh.c
+++ b/plugins/packagekit/gs-plugin-packagekit-refresh.c
@@ -118,11 +118,11 @@ gs_plugin_refresh (GsPlugin *plugin,
                filter = pk_bitfield_value (PK_FILTER_ENUM_NONE);
                pk_client_set_cache_age (PK_CLIENT (priv->task), cache_age);
                gs_plugin_status_update (plugin, NULL, GS_PLUGIN_STATUS_WAITING);
-               results = pk_client_get_updates (PK_CLIENT (priv->task),
-                                                filter,
-                                                cancellable,
-                                                gs_plugin_packagekit_progress_cb, &data,
-                                                error);
+               results = pk_task_get_updates_sync (priv->task,
+                                                   filter,
+                                                   cancellable,
+                                                   gs_plugin_packagekit_progress_cb, &data,
+                                                   error);
                if (!gs_plugin_packagekit_results_valid (results, error)) {
                        g_prefix_error (error, "failed to get updates for refresh: ");
                        return FALSE;


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