[gnome-software] snap: Don't override installed version with store version
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] snap: Don't override installed version with store version
- Date: Fri, 24 Nov 2017 02:49:32 +0000 (UTC)
commit 0f063792b8f44288e45f141706ab82a04e4c0c26
Author: Robert Ancell <robert ancell canonical com>
Date: Fri Nov 24 15:49:20 2017 +1300
snap: Don't override installed version with store version
plugins/snap/gs-plugin-snap.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
index 0d3caa8..9c0468f 100644
--- a/plugins/snap/gs-plugin-snap.c
+++ b/plugins/snap/gs-plugin-snap.c
@@ -729,7 +729,6 @@ gs_plugin_refine_app (GsPlugin *plugin,
GPtrArray *screenshots;
const gchar *name;
g_autofree gchar *description = NULL;
- g_autofree gchar *version = NULL;
if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN)
gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
@@ -743,8 +742,11 @@ gs_plugin_refine_app (GsPlugin *plugin,
if (description != NULL)
gs_app_set_description (app, GS_APP_QUALITY_NORMAL, description);
gs_app_set_license (app, GS_APP_QUALITY_NORMAL, snapd_snap_get_license (store_snap));
- version = g_strdup_printf ("%s (%s)", snapd_snap_get_version (store_snap),
snapd_snap_get_revision (store_snap));
- gs_app_set_version (app, version);
+ if (gs_app_get_version (app) == NULL) {
+ g_autofree gchar *version = NULL;
+ version = g_strdup_printf ("%s (%s)", snapd_snap_get_version (store_snap),
snapd_snap_get_revision (store_snap));
+ gs_app_set_version (app, version);
+ }
gs_app_set_size_download (app, snapd_snap_get_download_size (store_snap));
gs_app_set_developer_name (app, snapd_snap_get_developer (store_snap));
if (icon_url == NULL) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]