[gnome-software/wip/hughsie/unique_id] Use new-style AppStream unique-id's



commit 39b9eaf81bbcde2e0585ad40b4cc38b82d8806d8
Author: Richard Hughes <richard hughsie com>
Date:   Fri Jul 29 12:05:14 2016 +0100

    Use new-style AppStream unique-id's

 configure.ac |    2 +-
 src/gs-app.c |    5 +++++
 2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ecb6513..8a13731 100644
--- a/configure.ac
+++ b/configure.ac
@@ -63,7 +63,7 @@ dnl ---------------------------------------------------------------------------
 dnl - Check library dependencies
 dnl ---------------------------------------------------------------------------
 PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 3.18.2 gio-unix-2.0)
-PKG_CHECK_MODULES(APPSTREAM, appstream-glib >= 0.5.18)
+PKG_CHECK_MODULES(APPSTREAM, appstream-glib >= 0.6.1)
 PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0 >= 2.31.5)
 PKG_CHECK_MODULES(JSON_GLIB, json-glib-1.0 >= 1.1.1)
 PKG_CHECK_MODULES(SQLITE, sqlite3)
diff --git a/src/gs-app.c b/src/gs-app.c
index abda9b4..aabfe7c 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -855,6 +855,11 @@ void
 gs_app_set_unique_id (GsApp *app, const gchar *unique_id)
 {
        g_return_if_fail (GS_IS_APP (app));
+
+       /* check for validity */
+       if (!as_utils_unique_id_valid (unique_id))
+               g_warning ("unique ID %s is not valid!", unique_id);
+
        g_free (app->unique_id);
        app->unique_id = g_strdup (unique_id);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]