summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2015-09-16 12:40:44 +0100
committerRichard Hughes <richard@hughsie.com>2015-09-16 12:40:44 +0100
commit3063367545208ce831d26f850e0cc165dc4e2004 (patch)
treef32e68c4a2a51166748e71e7e71949c578a57ed2
parent35cfd22fb0371fe8eec3a866cda6bfa3741e6bf7 (diff)
downloadappstream-glib-3063367545208ce831d26f850e0cc165dc4e2004.tar.gz
Be less vocal when processing AppData files
-rw-r--r--libappstream-builder/plugins/asb-plugin-appdata.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/libappstream-builder/plugins/asb-plugin-appdata.c b/libappstream-builder/plugins/asb-plugin-appdata.c
index 08f2c66..e0d3851 100644
--- a/libappstream-builder/plugins/asb-plugin-appdata.c
+++ b/libappstream-builder/plugins/asb-plugin-appdata.c
@@ -45,28 +45,6 @@ asb_plugin_add_globs (AsbPlugin *plugin, GPtrArray *globs)
}
/**
- * asb_plugin_appdata_log_overwrite:
- */
-static void
-asb_plugin_appdata_log_overwrite (AsbApp *app,
- const gchar *property_name,
- const gchar *old,
- const gchar *new)
-{
- /* does the value already exist with this value */
- if (g_strcmp0 (old, new) == 0)
- return;
-
- /* does the metadata exist with any value */
- if (old != NULL) {
- asb_package_log (asb_app_get_package (app),
- ASB_PACKAGE_LOG_LEVEL_INFO,
- "AppData %s=%s->%s",
- property_name, old, new);
- }
-}
-
-/**
* asb_plugin_process_filename:
*/
static gboolean
@@ -195,18 +173,8 @@ asb_plugin_process_filename (AsbPlugin *plugin,
for (l = list; l != NULL; l = l->next) {
key = l->data;
tmp = g_hash_table_lookup (hash, key);
- if (g_strcmp0 (key, "C") == 0) {
- old = as_app_get_name (AS_APP (app), key);
- asb_plugin_appdata_log_overwrite (app, "name",
- old, tmp);
- }
as_app_set_name (AS_APP (app), key, tmp);
}
- if (g_list_length (list) == 1) {
- asb_package_log (asb_app_get_package (app),
- ASB_PACKAGE_LOG_LEVEL_WARNING,
- "AppData 'name' has no translations");
- }
g_list_free (list);
/* perhaps get summary */
@@ -215,18 +183,8 @@ asb_plugin_process_filename (AsbPlugin *plugin,
for (l = list; l != NULL; l = l->next) {
key = l->data;
tmp = g_hash_table_lookup (hash, key);
- if (g_strcmp0 (key, "C") == 0) {
- old = as_app_get_comment (AS_APP (app), key);
- asb_plugin_appdata_log_overwrite (app, "summary",
- old, tmp);
- }
as_app_set_comment (AS_APP (app), key, tmp);
}
- if (g_list_length (list) == 1) {
- asb_package_log (asb_app_get_package (app),
- ASB_PACKAGE_LOG_LEVEL_WARNING,
- "AppData 'summary' has no translations");
- }
g_list_free (list);
/* get descriptions */
@@ -237,11 +195,6 @@ asb_plugin_process_filename (AsbPlugin *plugin,
tmp = g_hash_table_lookup (hash, key);
as_app_set_description (AS_APP (app), key, tmp);
}
- if (g_list_length (list) == 1) {
- asb_package_log (asb_app_get_package (app),
- ASB_PACKAGE_LOG_LEVEL_WARNING,
- "AppData 'description' has no translations");
- }
g_list_free (list);
/* add screenshots if not already added */
@@ -269,8 +222,6 @@ asb_plugin_process_filename (AsbPlugin *plugin,
for (l = list; l != NULL; l = l->next) {
key = l->data;
tmp = g_hash_table_lookup (hash, key);
- old = as_app_get_metadata_item (AS_APP (app), key);
- asb_plugin_appdata_log_overwrite (app, "metadata", old, tmp);
as_app_add_metadata (AS_APP (app), key, tmp);
}