[gnome-software] Do not log a warning when trying to parse MetaInfo files



commit 58aad7b94b6f852fd24da6d9d978b7b003504456
Author: Richard Hughes <richard hughsie com>
Date:   Mon Jun 16 16:03:49 2014 +0100

    Do not log a warning when trying to parse MetaInfo files

 configure.ac                    |    2 +-
 src/plugins/gs-plugin-appdata.c |    5 +----
 2 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a0b78fc..b2732ea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,7 +61,7 @@ dnl - Check library dependencies
 dnl ---------------------------------------------------------------------------
 PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 3.13.1 gio-unix-2.0)
 PKG_CHECK_MODULES(PACKAGEKIT, packagekit-glib2 >= 0.8.12)
-PKG_CHECK_MODULES(APPSTREAM, appstream-glib >= 0.1.5)
+PKG_CHECK_MODULES(APPSTREAM, appstream-glib >= 0.1.8)
 PKG_CHECK_MODULES(SQLITE, sqlite3)
 PKG_CHECK_MODULES(SOUP, libsoup-2.4)
 PKG_CHECK_MODULES(GSETTINGS_DESKTOP_SCHEMAS, gsettings-desktop-schemas >= 3.11.5)
diff --git a/src/plugins/gs-plugin-appdata.c b/src/plugins/gs-plugin-appdata.c
index da8581a..56dbdff 100644
--- a/src/plugins/gs-plugin-appdata.c
+++ b/src/plugins/gs-plugin-appdata.c
@@ -100,11 +100,8 @@ gs_plugin_add_datadir (GsPlugin *plugin, const gchar *datadir, GError **error)
        while ((tmp = g_dir_read_name (dir)) != NULL) {
                if (g_strcmp0 (tmp, "schema") == 0)
                        continue;
-               if (!g_str_has_suffix (tmp, ".appdata.xml")) {
-                       g_warning ("AppData: not a data file: %s/%s",
-                                  cachedir, tmp);
+               if (as_app_guess_source_kind (tmp) != AS_APP_SOURCE_KIND_APPDATA)
                        continue;
-               }
                id = g_strdup (tmp);
                ext_tmp = g_strstr_len (id, -1, ".appdata.xml");
                if (ext_tmp != NULL)


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