diff options
author | Richard Hughes <richard@hughsie.com> | 2016-02-01 09:58:50 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2016-02-01 10:00:08 +0000 |
commit | 0eb39604b9da1af722807bd7347101f421a28af2 (patch) | |
tree | bc6da6e3ccc715e0f81487e78c8e2eb390e1d51c | |
parent | fe4f991daeb59753c9d97e118f2f816a225819b8 (diff) | |
download | appstream-glib-0eb39604b9da1af722807bd7347101f421a28af2.tar.gz |
Show the source of the 'appstream-util check-root' failure
Using just the app ID is confusing if we're loading from an AppData file.
-rw-r--r-- | client/as-util.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/client/as-util.c b/client/as-util.c index f85880a..b28f764 100644 --- a/client/as-util.c +++ b/client/as-util.c @@ -2844,7 +2844,7 @@ as_util_check_root_app_icon (AsApp *app, GError **error) static void as_util_check_root_app (AsApp *app, GPtrArray *problems) { - GError *error_local = NULL; + g_autoptr(GError) error_local = NULL; /* skip */ if (as_app_get_source_kind (app) == AS_APP_SOURCE_KIND_METAINFO) @@ -2857,14 +2857,17 @@ as_util_check_root_app (AsApp *app, GPtrArray *problems) /* check one line summary */ if (as_app_get_comment (app, NULL) == NULL) { g_ptr_array_add (problems, - g_strdup_printf ("%s has no Comment", - as_app_get_id (app))); + g_strdup_printf ("%s has no Comment\n - Source: %s", + as_app_get_id (app), + as_app_get_source_file (app))); } /* check icon exists and is large enough */ if (!as_util_check_root_app_icon (app, &error_local)) { - g_ptr_array_add (problems, g_strdup (error_local->message)); - g_clear_error (&error_local); + g_ptr_array_add (problems, + g_strdup_printf ("%s\n - Source: %s", + error_local->message, + as_app_get_source_file (app))); } } |