[gnome-software] trivial: Do not log a warning when setting optional metadata keys



commit 185f3083afe496265e7f601f692d749e4cb39027
Author: Richard Hughes <richard hughsie com>
Date:   Wed Jul 13 11:29:12 2016 +0100

    trivial: Do not log a warning when setting optional metadata keys

 src/gs-app.c             |    4 ++--
 src/plugins/gs-flatpak.c |    6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/gs-app.c b/src/gs-app.c
index 3bd60b3..75f3ed2 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -2147,8 +2147,8 @@ gs_app_set_metadata (GsApp *app, const gchar *key, const gchar *value)
        if (found != NULL) {
                if (g_strcmp0 (found, value) == 0)
                        return;
-               g_warning ("tried overwriting key %s from %s to %s",
-                          key, found, value);
+               g_warning ("tried overwriting %s key %s from %s to %s",
+                          app->id, key, found, value);
                return;
        }
        str = g_string_new (value);
diff --git a/src/plugins/gs-flatpak.c b/src/plugins/gs-flatpak.c
index c6984d5..a3ccb30 100644
--- a/src/plugins/gs-flatpak.c
+++ b/src/plugins/gs-flatpak.c
@@ -251,8 +251,10 @@ gs_flatpak_set_metadata_installed (GsFlatpak *self, GsApp *app,
 
        /* for all types */
        gs_flatpak_set_metadata (self, app, FLATPAK_REF (xref));
-       gs_app_set_metadata (app, "GnomeSoftware::Creator",
-                            gs_plugin_get_name (self->plugin));
+       if (gs_app_get_metadata_item (app, "GnomeSoftware::Creator") == NULL) {
+               gs_app_set_metadata (app, "GnomeSoftware::Creator",
+                                    gs_plugin_get_name (self->plugin));
+       }
 
        /* get the last time the app was updated */
        metadata_fn = g_build_filename (flatpak_installed_ref_get_deploy_dir (xref),


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