[gnome-software] Do not overwrite the update version if already set
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Do not overwrite the update version if already set
- Date: Tue, 24 May 2016 11:33:41 +0000 (UTC)
commit 227831cb908f550bce883b73c993ad999e6b842d
Author: Richard Hughes <richard hughsie com>
Date: Tue May 24 12:28:25 2016 +0100
Do not overwrite the update version if already set
If the application doesn't have any <releases> information we want to use the
distro-provided version number rather than overwriting it with the possibly
very old version from the distro-shipped AppStream metadata.
src/plugins/gs-appstream.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/plugins/gs-appstream.c b/src/plugins/gs-appstream.c
index 4bb0c23..8bce301 100644
--- a/src/plugins/gs-appstream.c
+++ b/src/plugins/gs-appstream.c
@@ -374,10 +374,12 @@ gs_appstream_refine_app_updates (GsPlugin *plugin,
gs_app_set_update_details (app, update_desc->str);
}
- /* newest release only */
- rel = as_app_get_release_default (item);
- if (rel != NULL)
- gs_app_set_update_version (app, as_release_get_version (rel));
+ /* if there is no already set update version use the newest */
+ if (gs_app_get_update_version (app) == NULL) {
+ rel = as_app_get_release_default (item);
+ if (rel != NULL)
+ gs_app_set_update_version (app, as_release_get_version (rel));
+ }
/* success */
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]