[gnome-software/gnome-3-30] packagekit: Fix offline update downloads for single app updates



commit f931e572042069cf9b034b2b5b5db2c3563d8315
Author: Kalev Lember <klember redhat com>
Date:   Mon Dec 17 12:33:07 2018 +0100

    packagekit: Fix offline update downloads for single app updates
    
    We were only triggering offline update downloads for the "OS Updates"
    proxy app, but not when only individual app updates were available, in
    which case nothing at all got downloaded.

 plugins/packagekit/gs-plugin-packagekit-refresh.c | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/plugins/packagekit/gs-plugin-packagekit-refresh.c 
b/plugins/packagekit/gs-plugin-packagekit-refresh.c
index 37961e5e..ff893daa 100644
--- a/plugins/packagekit/gs-plugin-packagekit-refresh.c
+++ b/plugins/packagekit/gs-plugin-packagekit-refresh.c
@@ -118,6 +118,15 @@ gs_plugin_download (GsPlugin *plugin,
        for (guint i = 0; i < gs_app_list_length (list); i++) {
                GsApp *app = gs_app_list_index (list, i);
                GsAppList *related = gs_app_get_related (app);
+
+               /* add this app */
+               if (!gs_app_has_quirk (app, AS_APP_QUIRK_IS_PROXY))
+                       if (g_strcmp0 (gs_app_get_management_plugin (app), "packagekit") == 0) {
+                               gs_app_list_add (list_tmp, app);
+                       continue;
+               }
+
+               /* add each related app */
                for (guint j = 0; j < gs_app_list_length (related); j++) {
                        GsApp *app_tmp = gs_app_list_index (related, j);
                        if (g_strcmp0 (gs_app_get_management_plugin (app_tmp), "packagekit") == 0)


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