[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:35 +0000 (UTC)
commit 156c3b7214d8052ae05fcbe12f2e452a31cc2771
Author: Robert Ancell <robert ancell canonical com>
Date: Mon Aug 15 16:33:59 2016 +1200
Drop unnecessary changes from gnome-3-20
src/plugins/gs-plugin-packagekit-refresh.c | 14 +-------------
src/plugins/gs-plugin-xdg-app.c | 9 ++++++++-
2 files changed, 9 insertions(+), 14 deletions(-)
---
diff --git a/src/plugins/gs-plugin-packagekit-refresh.c b/src/plugins/gs-plugin-packagekit-refresh.c
index 402e28c..97d84d3 100644
--- a/src/plugins/gs-plugin-packagekit-refresh.c
+++ b/src/plugins/gs-plugin-packagekit-refresh.c
@@ -50,17 +50,6 @@ gs_plugin_get_name (void)
}
/**
- * gs_plugin_get_conflicts:
- */
-const gchar **
-gs_plugin_get_conflicts (GsPlugin *plugin)
-{
- static const gchar *deps[] = {
- NULL };
- return deps;
-}
-
-/**
* gs_plugin_initialize:
*/
void
@@ -320,7 +309,6 @@ gs_plugin_filename_to_app (GsPlugin *plugin,
data.ptask = NULL;
/* get details */
- filename = g_file_get_path (file);
files = g_strsplit (filename, "\t", -1);
pk_client_set_cache_age (PK_CLIENT (plugin->priv->task), G_MAXUINT);
results = pk_client_get_details_local (PK_CLIENT (plugin->priv->task),
@@ -378,7 +366,7 @@ gs_plugin_filename_to_app (GsPlugin *plugin,
/* look for a desktop file so we can use a valid application id */
if (!gs_plugin_packagekit_refresh_guess_app_id (plugin,
app,
- g_file_get_path (file),
+ filename,
cancellable,
error))
return FALSE;
diff --git a/src/plugins/gs-plugin-xdg-app.c b/src/plugins/gs-plugin-xdg-app.c
index ca2202d..f6f6319 100644
--- a/src/plugins/gs-plugin-xdg-app.c
+++ b/src/plugins/gs-plugin-xdg-app.c
@@ -1298,8 +1298,10 @@ gs_plugin_app_install (GsPlugin *plugin,
/* use the source for local apps */
if (gs_app_get_state (app) == AS_APP_STATE_AVAILABLE_LOCAL) {
+ g_autoptr(GFile) file = NULL;
+ file = g_file_new_for_path (gs_app_get_source_default (app));
xref = xdg_app_installation_install_bundle (plugin->priv->installation,
- gs_app_get_local_file (app),
+ file,
gs_plugin_xdg_app_progress_cb,
&helper,
cancellable, error);
@@ -1379,6 +1381,7 @@ gs_plugin_filename_to_app (GsPlugin *plugin,
g_autoptr(GBytes) appstream_gz = NULL;
g_autoptr(GBytes) icon_data = NULL;
g_autoptr(GBytes) metadata = NULL;
+ g_autoptr(GFile) file = NULL;
g_autoptr(GsApp) app = NULL;
g_autoptr(XdgAppBundleRef) xref_bundle = NULL;
const gchar *mimetypes[] = {
@@ -1393,6 +1396,7 @@ gs_plugin_filename_to_app (GsPlugin *plugin,
return TRUE;
/* load bundle */
+ file = g_file_new_for_path (filename);
xref_bundle = xdg_app_bundle_ref_new (file, error);
if (xref_bundle == NULL) {
g_prefix_error (error, "error loading bundle: ");
@@ -1481,6 +1485,9 @@ gs_plugin_filename_to_app (GsPlugin *plugin,
gs_app_set_icon (app, icon);
}
+ /* set the source so we can install it higher up */
+ gs_app_add_source (app, filename);
+
/* not quite true: this just means we can update this specific app */
if (xdg_app_bundle_ref_get_origin (xref_bundle))
gs_app_add_quirk (app, AS_APP_QUIRK_HAS_SOURCE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]