diff options
author | Richard Hughes <richard@hughsie.com> | 2015-01-09 14:47:41 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2015-01-09 14:47:49 +0000 |
commit | 7b6d6a9dd064d903cc84edbe81cea50bf60bb6c6 (patch) | |
tree | b54ec33b23d1452428686e1537149f38cf904a5b /libappstream-builder/plugins | |
parent | 3d18e6d9ac95347243d1284090aee0de4cc7da44 (diff) | |
download | appstream-glib-7b6d6a9dd064d903cc84edbe81cea50bf60bb6c6.tar.gz |
Do not blacklist applications with broken AppData files
In this case, the right thing to do is warn and then fall back to the desktop
file information.
Diffstat (limited to 'libappstream-builder/plugins')
-rw-r--r-- | libappstream-builder/plugins/asb-plugin-appdata.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/libappstream-builder/plugins/asb-plugin-appdata.c b/libappstream-builder/plugins/asb-plugin-appdata.c index f134fce..0d58cac 100644 --- a/libappstream-builder/plugins/asb-plugin-appdata.c +++ b/libappstream-builder/plugins/asb-plugin-appdata.c @@ -502,6 +502,7 @@ asb_plugin_process_app (AsbPlugin *plugin, const gchar *tmpdir, GError **error) { + GError *error_local = NULL; const gchar *kind_str; const gchar *tmp; _cleanup_free_ gchar *appdata_basename = NULL; @@ -545,10 +546,20 @@ asb_plugin_process_app (AsbPlugin *plugin, /* any installed appdata file */ if (g_file_test (appdata_filename, G_FILE_TEST_EXISTS)) { - return asb_plugin_process_filename (plugin, - app, - appdata_filename, - error); + /* be understanding if upstream gets the AppData file + * wrong -- just fall back to the desktop file data */ + if (!asb_plugin_process_filename (plugin, + app, + appdata_filename, + &error_local)) { + error_local->code = ASB_PLUGIN_ERROR_IGNORE; + g_propagate_error (error, error_local); + g_prefix_error (error, + "AppData file '%s' invalid: ", + appdata_filename); + return FALSE; + } + return TRUE; } /* we're going to require this soon */ |