[gnome-software] trivial: Use appstream-glib new vercmp API in new libxmlb code as well
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Use appstream-glib new vercmp API in new libxmlb code as well
- Date: Wed, 24 Oct 2018 10:17:21 +0000 (UTC)
commit 71d6f570b66bb7d82fb8a8cc8dee0fd177efdc74
Author: Kalev Lember <klember redhat com>
Date: Wed Oct 24 12:15:51 2018 +0200
trivial: Use appstream-glib new vercmp API in new libxmlb code as well
Missed this in the previous commit.
plugins/core/gs-appstream.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/plugins/core/gs-appstream.c b/plugins/core/gs-appstream.c
index 2649ee06..ffdff8b7 100644
--- a/plugins/core/gs-appstream.c
+++ b/plugins/core/gs-appstream.c
@@ -665,7 +665,15 @@ gs_appstream_refine_app (GsPlugin *plugin,
"requires/id[@type='id']"
"[text()='org.gnome.Software.desktop']", NULL);
if (req != NULL) {
- if (as_utils_vercmp (xb_node_get_attr (req, "version"), PACKAGE_VERSION) > 0) {
+#if AS_CHECK_VERSION(0,7,14)
+ gint rc = as_utils_vercmp_full (xb_node_get_attr (req, "version"),
+ PACKAGE_VERSION,
+ AS_VERSION_COMPARE_FLAG_NONE);
+#else
+ gint rc = as_utils_vercmp (xb_node_get_attr (req, "version"),
+ PACKAGE_VERSION);
+#endif
+ if (rc > 0) {
g_set_error (error,
GS_PLUGIN_ERROR,
GS_PLUGIN_ERROR_NOT_SUPPORTED,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]