Work around libsoup recursive type hang in tests

Closes: #1952
Approved by: alexlarsson
This commit is contained in:
Alexander Larsson
2018-08-09 17:21:56 +02:00
committed by Atomic Bot
parent f176d3eba3
commit 3fa34ebd8a
3 changed files with 8 additions and 0 deletions

View File

@@ -596,6 +596,9 @@ main (int argc,
g_set_prgname (argv[0]);
/* Avoid weird recursive type initialization deadlocks from libsoup */
g_type_ensure (G_TYPE_SOCKET);
/* avoid gvfs (http://bugzilla.gnome.org/show_bug.cgi?id=526454) */
old_env = g_strdup (g_getenv ("GIO_USE_VFS"));
g_setenv ("GIO_USE_VFS", "local", TRUE);

View File

@@ -129,6 +129,8 @@ flatpak_installation_class_init (FlatpakInstallationClass *klass)
object_class->set_property = flatpak_installation_set_property;
object_class->finalize = flatpak_installation_finalize;
/* Avoid weird recursive type initialization deadlocks from libsoup */
g_type_ensure (G_TYPE_SOCKET);
}
static void

View File

@@ -8,6 +8,9 @@ main (int argc, char *argv[])
const char *url, *dest;
int flags = 0;
/* Avoid weird recursive type initialization deadlocks from libsoup */
g_type_ensure (G_TYPE_SOCKET);
if (argc == 3)
{
url = argv[1];