[gnome-software/wip/ubuntu-xenial] Drop unnecessary changes from gnome-3-20
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/ubuntu-xenial] Drop unnecessary changes from gnome-3-20
- Date: Mon, 15 Aug 2016 04:37:30 +0000 (UTC)
commit 99a407e71d95ca9a7a0e6b474c7d7f2e0f4ae8a4
Author: Robert Ancell <robert ancell canonical com>
Date: Mon Aug 15 16:33:54 2016 +1200
Drop unnecessary changes from gnome-3-20
src/plugins/gs-plugin-packagekit.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/src/plugins/gs-plugin-packagekit.c b/src/plugins/gs-plugin-packagekit.c
index 1c613c0..a3efa40 100644
--- a/src/plugins/gs-plugin-packagekit.c
+++ b/src/plugins/gs-plugin-packagekit.c
@@ -323,11 +323,9 @@ gs_plugin_app_install (GsPlugin *plugin,
ProgressData data;
const gchar *package_id;
guint i, j;
- g_autoptr(PkError) error_code = NULL;
- g_autofree gchar *local_filename = NULL;
- g_auto(GStrv) package_ids = NULL;
g_autoptr(PkResults) results = NULL;
g_autoptr(GPtrArray) array_package_ids = NULL;
+ g_auto(GStrv) package_ids = NULL;
data.app = app;
data.plugin = plugin;
@@ -441,15 +439,15 @@ gs_plugin_app_install (GsPlugin *plugin,
break;
case AS_APP_STATE_AVAILABLE_LOCAL:
- if (gs_app_get_local_file (app) == NULL) {
+ package_id = gs_app_get_metadata_item (app, "packagekit::local-filename");
+ if (package_id == NULL) {
g_set_error_literal (error,
GS_PLUGIN_ERROR,
GS_PLUGIN_ERROR_NOT_SUPPORTED,
"local package, but no filename");
return FALSE;
}
- local_filename = g_file_get_path (gs_app_get_local_file (app));
- package_ids = g_strsplit (local_filename, "\t", -1);
+ package_ids = g_strsplit (package_id, "\t", -1);
gs_app_set_state (app, AS_APP_STATE_INSTALLING);
results = pk_task_install_files_sync (plugin->priv->task,
package_ids,
@@ -465,7 +463,7 @@ gs_plugin_app_install (GsPlugin *plugin,
gs_app_set_state (app, AS_APP_STATE_INSTALLED);
/* get the new icon from the package */
- gs_app_set_local_file (app, NULL);
+ gs_app_set_metadata (app, "packagekit::local-filename", NULL);
gs_app_set_icon (app, NULL);
gs_app_set_pixbuf (app, NULL);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]