File gs.patch of Package gnome-software
diff --git a/plugins/flatpak/gs-plugin-flatpak.c b/plugins/flatpak/gs-plugin-flatpak.c
index c9fde1a43..234997088 100644
--- a/plugins/flatpak/gs-plugin-flatpak.c
+++ b/plugins/flatpak/gs-plugin-flatpak.c
@@ -303,11 +303,15 @@ setup_thread_cb (GTask *task,
* pull the data as we can't do anything with it */
permission = gs_utils_get_permission (action_id, NULL, &permission_error);
if (permission == NULL) {
+ g_print ("Flatpak: %s: no permission for '%s': %s\n", __FUNCTION__, action_id, permission_error->message);
g_debug ("no permission for %s: %s", action_id, permission_error->message);
g_clear_error (&permission_error);
} else {
self->has_system_helper = g_permission_get_allowed (permission) ||
g_permission_get_can_acquire (permission);
+ g_print ("Flatpak: %s: has_system_helper:%d allowed:%d can_acquire:%d\n", __FUNCTION__, self->has_system_helper,
+ g_permission_get_allowed (permission),
+ g_permission_get_can_acquire (permission));
}
/* if we're not just running the tests */
@@ -321,9 +325,14 @@ setup_thread_cb (GTask *task,
&error_local);
if (installations == NULL) {
+ g_print ("Flatpak: %s: failed to get system installations: %s\n", __FUNCTION__, error_local->message);
gs_plugin_flatpak_report_warning (plugin, &error_local);
g_clear_error (&error_local);
+ } else {
+ g_print ("Flatpak: %s: got %u system installations\n", __FUNCTION__, installations->len);
}
+ } else {
+ g_print ("Flatpak: %s: no system helper, skip system installations\n", __FUNCTION__);
}
/* include the user installation */
@@ -351,6 +360,7 @@ setup_thread_cb (GTask *task,
g_autoptr(GFile) file = g_file_new_for_path (full_path);
g_autoptr(FlatpakInstallation) installation = NULL;
g_debug ("using custom flatpak path %s", full_path);
+ g_print ("Flatpak: %s: using custom flatpak path '%s'\n", __FUNCTION__, full_path);
installation = flatpak_installation_new_for_path (file, TRUE,
cancellable,
&error_local);
@@ -373,21 +383,28 @@ setup_thread_cb (GTask *task,
installation,
cancellable,
&error_local)) {
+ g_print ("Flatpak: %s: failed to add installation '%s','%s': %s\n", __FUNCTION__, flatpak_installation_get_id (installation),
+ flatpak_installation_get_display_name (installation), error_local->message);
gs_plugin_flatpak_report_warning (plugin,
&error_local);
continue;
+ } else {
+ g_print ("Flatpak: %s: added installation '%s','%s'\n", __FUNCTION__, flatpak_installation_get_id (installation),
+ flatpak_installation_get_display_name (installation));
}
}
/* when no installation has been loaded, return the error so the
* plugin gets disabled */
if (self->installations->len == 0) {
+ g_print ("Flatpak: %s: failed to load any flatpak installation\n", __FUNCTION__);
g_task_return_new_error (task,
GS_PLUGIN_ERROR, GS_PLUGIN_ERROR_FAILED,
"Failed to load any Flatpak installations");
return;
}
+ g_print ("Flatpak: %s: loaded %u flatpak installations\n", __FUNCTION__, self->installations->len);
g_task_return_boolean (task, TRUE);
}