[gnome-software/wip/ubuntu-xenial] Fix installation of local debs



commit fa62d0ddaeb2899d73a3576b1e2fe86380664df0
Author: William Hua <william hua canonical com>
Date:   Tue Apr 26 10:27:28 2016 +0200

    Fix installation of local debs

 src/plugins/gs-plugin-apt.cc |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-plugin-apt.cc b/src/plugins/gs-plugin-apt.cc
index 98cfa92..a0c547d 100644
--- a/src/plugins/gs-plugin-apt.cc
+++ b/src/plugins/gs-plugin-apt.cc
@@ -895,6 +895,7 @@ gs_plugin_app_install (GsPlugin *plugin,
                       GCancellable *cancellable,
                       GError **error)
 {
+       g_autofree gchar *filename = NULL;
        gboolean success = FALSE;
 
        if (!app_is_ours (app))
@@ -910,9 +911,10 @@ gs_plugin_app_install (GsPlugin *plugin,
                success = aptd_transaction (plugin, "InstallPackages", app, NULL, NULL, error);
                break;
        case AS_APP_STATE_AVAILABLE_LOCAL:
+               filename = g_file_get_path (gs_app_get_local_file (app));
                gs_app_set_state (app, AS_APP_STATE_INSTALLING);
                success = aptd_transaction (plugin, "InstallFile", app, NULL,
-                                           g_variant_new_parsed ("(%s, true)", gs_app_get_source_default 
(app)),
+                                           g_variant_new_parsed ("(%s, true)", filename),
                                            error);
                break;
        default:


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