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



commit be73ce9892febfc303a8c4cecdac857d388f7974
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 cdaa3ca..5c9ba06 100644
--- a/src/plugins/gs-flatpak.c
+++ b/src/plugins/gs-flatpak.c
@@ -1354,6 +1354,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))
@@ -1369,12 +1370,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]