pidgin/pidgin

Parents c4e4896c5437
Children cc8bddbd1b82
Fix an issue where gio was bombing out early and causing our unit tests to fail

This was accidentally introduced in /r/1921 when the unit tests moved to a
GMemorySettingsBackend. This was fixed upstream in 2.73.3. The upstream merge
request is here https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2813/.

Testing Done:
Used convey to build under debian, ubuntu, and fedora.

Reviewed at https://reviews.imfreedom.org/r/1986/
--- a/libpurple/core.c Thu Oct 27 16:51:25 2022 -0500
+++ b/libpurple/core.c Fri Oct 28 01:32:23 2022 -0500
@@ -112,6 +112,15 @@
ops = purple_core_get_ui_ops();
+ /* This monster is to work around a bug that was fixed in glib 2.73.3. Once
+ * we require glib 2.74.0 this should be removed.
+ */
+ if(TRUE) {
+ char *path = g_build_filename(purple_config_dir(), "dummy.ini", NULL);
+ g_object_unref(g_keyfile_settings_backend_new(path, "/dummy/", NULL));
+ g_free(path);
+ }
+
/* The signals subsystem is important and should be first. */
purple_signals_init();
--- a/meson.build Thu Oct 27 16:51:25 2022 -0500
+++ b/meson.build Fri Oct 28 01:32:23 2022 -0500
@@ -205,6 +205,8 @@
#######################################################################
# Check for GLib (required)
#######################################################################
+# Once we require >= 2.74.0, remove the hack in the if(TRUE) block in
+# libpurple/core.c.
glib = dependency('glib-2.0', version : '>= 2.70.0')
gio = dependency('gio-2.0')
gobject = dependency('gobject-2.0')