[gnome-software/wip/temp/ubuntu-xenial-rebased-corrected: 142/331] Fix wrong parameters being passed to aptd



commit 4512c8eeccbeb96a56a7ea4714b05f4424652877
Author: Robert Ancell <robert ancell canonical com>
Date:   Fri Mar 4 15:37:34 2016 +1300

    Fix wrong parameters being passed to aptd

 src/plugins/gs-plugin-apt.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/plugins/gs-plugin-apt.c b/src/plugins/gs-plugin-apt.c
index f373b49..a0d76cd 100644
--- a/src/plugins/gs-plugin-apt.c
+++ b/src/plugins/gs-plugin-apt.c
@@ -620,10 +620,13 @@ aptd_transaction (GsPlugin *plugin, const gchar *method, GsApp *app, GError **er
                return FALSE;
 
        if (g_strcmp0 (method, "InstallFile") == 0)
-               parameters = g_variant_new_parsed ("(%s, true)", gs_app_get_origin (app));
-       else if (app != NULL)
-               parameters = g_variant_new_parsed ("[%s]", gs_app_get_source_default (app));
-       else
+               parameters = g_variant_new ("(sb)", gs_app_get_origin (app), TRUE);
+       else if (app != NULL) {
+               GVariantBuilder builder;
+               g_variant_builder_init (&builder, G_VARIANT_TYPE ("as")),
+               g_variant_builder_add (&builder, "s", gs_app_get_source_default (app));
+               parameters = g_variant_new ("(as)", &builder);
+       } else
                parameters = g_variant_new ("()");
        result = g_dbus_connection_call_sync (conn,
                                              "org.debian.apt",


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