[gnome-builder] flatpak: add debug logging when checking for existing file



commit 8c18ef71cb4114709407993eff1b91ca6964c771
Author: Christian Hergert <chergert redhat com>
Date:   Fri Mar 9 12:07:34 2018 -0800

    flatpak: add debug logging when checking for existing file
    
    This might be useful in tracking down a bug that could be limited to
    certain systems.

 src/plugins/flatpak/gbp-flatpak-configuration-provider.c | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/src/plugins/flatpak/gbp-flatpak-configuration-provider.c 
b/src/plugins/flatpak/gbp-flatpak-configuration-provider.c
index aae0d9814..e88d1895a 100644
--- a/src/plugins/flatpak/gbp-flatpak-configuration-provider.c
+++ b/src/plugins/flatpak/gbp-flatpak-configuration-provider.c
@@ -375,18 +375,27 @@ static gboolean
 contains_file (GbpFlatpakConfigurationProvider *self,
                GFile                           *file)
 {
+  g_autofree gchar *path = NULL;
+
   g_assert (GBP_IS_FLATPAK_CONFIGURATION_PROVIDER (self));
   g_assert (G_IS_FILE (file));
 
+  path = g_file_get_path (file);
+  g_debug ("Checking for existing configuration: %s", path);
+
   for (guint i = 0; i < self->configs->len; i++)
     {
       GbpFlatpakManifest *manifest = g_ptr_array_index (self->configs, i);
+      g_autofree gchar *loc_path = NULL;
       GFile *loc;
 
       g_assert (GBP_IS_FLATPAK_MANIFEST (manifest));
 
       loc = gbp_flatpak_manifest_get_file (manifest);
 
+      loc_path = g_file_get_path (loc);
+      g_debug ("  [%u] = %s", i, loc_path);
+
       if (g_file_equal (loc, file))
         return TRUE;
     }


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