[gnome-software/gnome-3-22] trivial: Log warning message when we can't find a remote that should exist



commit 8826517a2020141a717e09a5ba5d2208ebb881c6
Author: Richard Hughes <richard hughsie com>
Date:   Thu Feb 23 14:48:59 2017 +0000

    trivial: Log warning message when we can't find a remote that should exist
    
    This would have been really useful when we were trying to debug an issue that
    turned out to be the fault of virtual box shared folders.

 src/plugins/gs-flatpak.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-flatpak.c b/src/plugins/gs-flatpak.c
index 4100725..9b8e089 100644
--- a/src/plugins/gs-flatpak.c
+++ b/src/plugins/gs-flatpak.c
@@ -1211,6 +1211,7 @@ refine_origin_from_installation (GsFlatpak *self,
                const gchar *remote_name;
                FlatpakRemote *xremote = g_ptr_array_index (xremotes, i);
                g_autoptr(FlatpakRemoteRef) xref = NULL;
+               g_autoptr(GError) error_local = NULL;
 
                /* not enabled */
                if (flatpak_remote_get_disabled (xremote))
@@ -1226,12 +1227,14 @@ refine_origin_from_installation (GsFlatpak *self,
                                                                   gs_app_get_flatpak_arch (app),
                                                                   gs_app_get_flatpak_branch (app),
                                                                   cancellable,
-                                                                  NULL);
+                                                                  &error_local);
                if (xref != NULL) {
                        g_debug ("found remote %s", remote_name);
                        gs_app_set_origin (app, remote_name);
                        return TRUE;
                }
+               g_warning ("failed to find remote %s: %s",
+                          remote_name, error_local->message);
        }
        g_set_error (error,
                     GS_PLUGIN_ERROR,


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