r32377 - in /desktop/unstable/gnome-keyring/debian: changelog patches/00git_glib_2.31_deprecations.patch patches/series

mpitt at users.alioth.debian.org mpitt at users.alioth.debian.org
Thu Jan 12 10:30:49 UTC 2012


Author: mpitt
Date: Thu Jan 12 10:30:48 2012
New Revision: 32377

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=32377
Log:
Add 00git_glib_2.31_deprecations.patch: Fix deprecated API for building
with glib 2.31. Backported from upstream git head. (LP: #911125)

Added:
    desktop/unstable/gnome-keyring/debian/patches/00git_glib_2.31_deprecations.patch
Modified:
    desktop/unstable/gnome-keyring/debian/changelog
    desktop/unstable/gnome-keyring/debian/patches/series

Modified: desktop/unstable/gnome-keyring/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-keyring/debian/changelog?rev=32377&op=diff
==============================================================================
--- desktop/unstable/gnome-keyring/debian/changelog [utf-8] (original)
+++ desktop/unstable/gnome-keyring/debian/changelog [utf-8] Thu Jan 12 10:30:48 2012
@@ -2,8 +2,10 @@
 
   * Add 00git_gmodule_include.patch: Fix FTBFS due to missing gmodule package
     check when building against glib 2.31.
-
- -- Martin Pitt <martin.pitt at ubuntu.com>  Thu, 12 Jan 2012 11:23:14 +0100
+  * Add 00git_glib_2.31_deprecations.patch: Fix deprecated API for building
+    with glib 2.31. Backported from upstream git head. (LP: #911125)
+
+ -- Martin Pitt <mpitt at debian.org>  Thu, 12 Jan 2012 11:23:14 +0100
 
 gnome-keyring (3.2.2-1) unstable; urgency=low
 

Added: desktop/unstable/gnome-keyring/debian/patches/00git_glib_2.31_deprecations.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-keyring/debian/patches/00git_glib_2.31_deprecations.patch?rev=32377&op=file
==============================================================================
--- desktop/unstable/gnome-keyring/debian/patches/00git_glib_2.31_deprecations.patch (added)
+++ desktop/unstable/gnome-keyring/debian/patches/00git_glib_2.31_deprecations.patch [utf-8] Thu Jan 12 10:30:48 2012
@@ -1,0 +1,576 @@
+From bde64e94f83a6da4eaff6503744e200c9f1f0081 Mon Sep 17 00:00:00 2001
+From: Stef Walter <stefw at collabora.co.uk>
+Date: Tue, 6 Dec 2011 16:49:39 +0100
+Subject: [PATCH] Fix for deprecations in glib 2.31.x
+
+ * Mainly g_mutex_new/g_mutex_free g_cond_new/g_cond_free
+ * Since we like to build with the last stable version of glib,
+   using #ifdef until these glib changes make it into a stable release.
+---
+ daemon/gkd-main.c                           |    1 -
+ daemon/gpg-agent/gkd-gpg-agent-standalone.c |    3 -
+ daemon/gpg-agent/gkd-gpg-agent.c            |   18 +++++
+ daemon/ssh-agent/gkd-ssh-agent-standalone.c |    3 -
+ daemon/ssh-agent/gkd-ssh-agent.c            |   18 +++++
+ egg/egg-libgcrypt.c                         |   10 +++
+ egg/egg-testing.c                           |   90 +++++++++++++++++++++-----
+ pkcs11/gkm/gkm-timer.c                      |   45 +++++++++++---
+ pkcs11/gnome2-store/gkm-gnome2-standalone.c |    2 -
+ pkcs11/roots-store/gkm-roots-standalone.c   |    3 -
+ pkcs11/rpc-layer/gkm-rpc-dispatch.c         |    4 +
+ pkcs11/secret-store/gkm-secret-standalone.c |    3 -
+ pkcs11/ssh-store/gkm-ssh-standalone.c       |    2 -
+ pkcs11/xdg-store/gkm-xdg-standalone.c       |    2 -
+ tool/gkr-tool.c                             |    3 +-
+ ui/gku-prompt.c                             |   14 ++++-
+ 16 files changed, 172 insertions(+), 49 deletions(-)
+
+Index: gnome-keyring/daemon/gkd-main.c
+===================================================================
+--- gnome-keyring.orig/daemon/gkd-main.c	2012-01-03 12:27:31.203179916 +0100
++++ gnome-keyring/daemon/gkd-main.c	2012-01-03 12:27:33.439180024 +0100
+@@ -821,7 +821,6 @@
+ #endif
+ 
+ 	g_type_init ();
+-	g_thread_init (NULL);
+ 
+ #ifdef HAVE_LOCALE_H
+ 	/* internationalisation */
+Index: gnome-keyring/daemon/gpg-agent/gkd-gpg-agent-standalone.c
+===================================================================
+--- gnome-keyring.orig/daemon/gpg-agent/gkd-gpg-agent-standalone.c	2012-01-03 12:27:31.215179916 +0100
++++ gnome-keyring/daemon/gpg-agent/gkd-gpg-agent-standalone.c	2012-01-03 12:27:33.439180024 +0100
+@@ -79,9 +79,6 @@
+ 
+ 	g_type_init ();
+ 
+-	if (!g_thread_supported ())
+-		g_thread_init (NULL);
+-
+ 	if (argc <= 1) {
+ 		g_message ("specify pkcs11 module on the command line");
+ 		return 1;
+Index: gnome-keyring/daemon/gpg-agent/gkd-gpg-agent.c
+===================================================================
+--- gnome-keyring.orig/daemon/gpg-agent/gkd-gpg-agent.c	2012-01-03 12:27:31.231179918 +0100
++++ gnome-keyring/daemon/gpg-agent/gkd-gpg-agent.c	2012-01-03 12:27:33.439180024 +0100
+@@ -329,7 +329,11 @@
+ 	client->sock = new_fd;
+ 
+ 	/* And create a new thread/process */
++#if GLIB_CHECK_VERSION(2,31,2)
++	client->thread = g_thread_new ("gpg-agent", run_client_thread, &client->sock);
++#else
+ 	client->thread = g_thread_create (run_client_thread, &client->sock, TRUE, &error);
++#endif
+ 	if (!client->thread) {
+ 		g_warning ("couldn't create thread GPG agent connection: %s",
+ 		           error && error->message ? error->message : "");
+@@ -385,8 +389,15 @@
+ 		pkcs11_main_session = NULL;
+ 
+ 	g_mutex_unlock (pkcs11_main_mutex);
++#if GLIB_CHECK_VERSION(2,31,2)
++	g_mutex_clear (pkcs11_main_mutex);
++	g_free (pkcs11_main_mutex);
++	g_cond_clear (pkcs11_main_cond);
++	g_free (pkcs11_main_cond);
++#else
+ 	g_mutex_free (pkcs11_main_mutex);
+ 	g_cond_free (pkcs11_main_cond);
++#endif
+ 
+ 	g_assert (pkcs11_module);
+ 	g_object_unref (pkcs11_module);
+@@ -446,8 +457,15 @@
+ 
+ 	pkcs11_module = g_object_ref (module);
+ 
++#if GLIB_CHECK_VERSION(2,31,2)
++	pkcs11_main_mutex = g_new0 (GMutex, 1);
++	g_mutex_init (pkcs11_main_mutex);
++	pkcs11_main_cond = g_new0 (GCond, 1);
++	g_cond_init (pkcs11_main_cond);
++#else
+ 	pkcs11_main_mutex = g_mutex_new ();
+ 	pkcs11_main_cond = g_cond_new ();
++#endif
+ 	pkcs11_main_checked = FALSE;
+ 	pkcs11_main_session = session;
+ 
+Index: gnome-keyring/daemon/ssh-agent/gkd-ssh-agent-standalone.c
+===================================================================
+--- gnome-keyring.orig/daemon/ssh-agent/gkd-ssh-agent-standalone.c	2012-01-03 12:27:31.175179915 +0100
++++ gnome-keyring/daemon/ssh-agent/gkd-ssh-agent-standalone.c	2012-01-03 12:27:33.439180024 +0100
+@@ -80,9 +80,6 @@
+ 
+ 	g_type_init ();
+ 
+-	if (!g_thread_supported ())
+-		g_thread_init (NULL);
+-
+ 	if (argc <= 1) {
+ 		g_message ("specify pkcs11 module on the command line");
+ 		return 1;
+Index: gnome-keyring/daemon/ssh-agent/gkd-ssh-agent.c
+===================================================================
+--- gnome-keyring.orig/daemon/ssh-agent/gkd-ssh-agent.c	2012-01-03 12:27:31.191179916 +0100
++++ gnome-keyring/daemon/ssh-agent/gkd-ssh-agent.c	2012-01-03 12:27:33.439180024 +0100
+@@ -282,7 +282,11 @@
+ 	client->sock = new_fd;
+ 
+ 	/* And create a new thread/process */
++#if GLIB_CHECK_VERSION(2,31,3)
++	client->thread = g_thread_new ("ssh-agent", run_client_thread, &client->sock);
++#else
+ 	client->thread = g_thread_create (run_client_thread, &client->sock, TRUE, &error);
++#endif
+ 	if (!client->thread) {
+ 		g_warning ("couldn't create thread SSH agent connection: %s",
+ 		           egg_error_message (error));
+@@ -338,8 +342,15 @@
+ 		pkcs11_main_session = NULL;
+ 
+ 	g_mutex_unlock (pkcs11_main_mutex);
++#if GLIB_CHECK_VERSION(2,31,3)
++	g_mutex_clear (pkcs11_main_mutex);
++	g_free (pkcs11_main_mutex);
++	g_cond_clear (pkcs11_main_cond);
++	g_free (pkcs11_main_cond);
++#else
+ 	g_mutex_free (pkcs11_main_mutex);
+ 	g_cond_free (pkcs11_main_cond);
++#endif
+ 
+ 	gck_list_unref_free (pkcs11_modules);
+ 	pkcs11_modules = NULL;
+@@ -398,8 +409,15 @@
+ 	g_assert (!pkcs11_modules);
+ 	pkcs11_modules = g_list_append (NULL, g_object_ref (module));
+ 
++#if GLIB_CHECK_VERSION(2,31,3)
++	pkcs11_main_mutex = g_new0 (GMutex, 1);
++	g_mutex_init (pkcs11_main_mutex);
++	pkcs11_main_cond = g_new0 (GCond, 1);
++	g_cond_init (pkcs11_main_cond);
++#else
+ 	pkcs11_main_mutex = g_mutex_new ();
+ 	pkcs11_main_cond = g_cond_new ();
++#endif
+ 	pkcs11_main_checked = FALSE;
+ 	pkcs11_main_session = session;
+ 
+Index: gnome-keyring/egg/egg-libgcrypt.c
+===================================================================
+--- gnome-keyring.orig/egg/egg-libgcrypt.c	2012-01-03 12:27:31.043179908 +0100
++++ gnome-keyring/egg/egg-libgcrypt.c	2012-01-03 12:27:33.439180024 +0100
+@@ -54,14 +54,24 @@
+ static int
+ glib_thread_mutex_init (void **lock)
+ {
++#if GLIB_CHECK_VERSION(2,31,3)
++	*lock = g_new0 (GMutex, 1);
++	g_mutex_init (*lock);
++#else
+ 	*lock = g_mutex_new ();
++#endif
+ 	return 0;
+ }
+ 
+ static int 
+ glib_thread_mutex_destroy (void **lock)
+ {
++#if GLIB_CHECK_VERSION(2,31,3)
++	g_mutex_clear (*lock);
++	g_free (*lock);
++#else
+ 	g_mutex_free (*lock);
++#endif
+ 	return 0;
+ }
+ 
+Index: gnome-keyring/egg/egg-testing.c
+===================================================================
+--- gnome-keyring.orig/egg/egg-testing.c	2012-01-03 12:27:31.055179910 +0100
++++ gnome-keyring/egg/egg-testing.c	2012-01-03 12:27:33.439180024 +0100
+@@ -28,9 +28,16 @@
+ #include <errno.h>
+ #include <unistd.h>
+ 
++#if GLIB_CHECK_VERSION(2,31,3)
++static GCond wait_condition;
++static GCond wait_start;
++static GMutex wait_mutex;
++#else
+ static GCond *wait_condition = NULL;
+ static GCond *wait_start = NULL;
+ static GMutex *wait_mutex = NULL;
++#endif
++
+ static gboolean wait_waiting = FALSE;
+ 
+ static const char HEXC[] = "0123456789ABCDEF";
+@@ -82,40 +89,73 @@
+ void
+ egg_test_wait_stop (void)
+ {
+-	GTimeVal tv;
+-
+-	g_get_current_time (&tv);
+-	g_time_val_add (&tv, 1000);
+-
++#if GLIB_CHECK_VERSION(2,31,3)
++	g_mutex_lock (&wait_mutex);
++#else
+ 	g_assert (wait_mutex);
+ 	g_assert (wait_condition);
+ 	g_mutex_lock (wait_mutex);
+-		if (!wait_waiting)
+-			g_cond_timed_wait (wait_start, wait_mutex, &tv);
+-		g_assert (wait_waiting);
+-		g_cond_broadcast (wait_condition);
++#endif
++
++	if (!wait_waiting) {
++#if GLIB_CHECK_VERSION(2,31,3)
++		gint64 time = g_get_monotonic_time () + 1 * G_TIME_SPAN_SECOND;
++		g_cond_wait_until (&wait_start, &wait_mutex, time);
++#else
++		GTimeVal tv;
++		g_get_current_time (&tv);
++		g_time_val_add (&tv, 1000);
++		g_cond_timed_wait (wait_start, wait_mutex, &tv);
++#endif
++	}
++	g_assert (wait_waiting);
++
++#if GLIB_CHECK_VERSION(2,31,3)
++	g_cond_broadcast (&wait_condition);
++	g_mutex_unlock (&wait_mutex);
++#else
++	g_cond_broadcast (wait_condition);
+ 	g_mutex_unlock (wait_mutex);
++#endif
+ }
+ 
+ gboolean
+ egg_test_wait_until (int timeout)
+ {
+-	GTimeVal tv;
+ 	gboolean ret;
+ 
+-	g_get_current_time (&tv);
+-	g_time_val_add (&tv, timeout * 1000);
+-
++#if GLIB_CHECK_VERSION(2,31,3)
++	g_mutex_lock (&wait_mutex);
++#else
+ 	g_assert (wait_mutex);
+ 	g_assert (wait_condition);
+ 	g_mutex_lock (wait_mutex);
+-		g_assert (!wait_waiting);
+-		wait_waiting = TRUE;
++#endif
++
++	g_assert (!wait_waiting);
++	wait_waiting = TRUE;
++
++	{
++#if GLIB_CHECK_VERSION(2,31,3)
++		gint64 time = g_get_monotonic_time () + ((timeout + 1000) * G_TIME_SPAN_MILLISECOND);
++		g_cond_broadcast (&wait_start);
++		ret = g_cond_wait_until (&wait_start, &wait_mutex, time);
++#else
++		GTimeVal tv;
++		g_get_current_time (&tv);
++		g_time_val_add (&tv, timeout * 1000);
+ 		g_cond_broadcast (wait_start);
+ 		ret = g_cond_timed_wait (wait_condition, wait_mutex, &tv);
+-		g_assert (wait_waiting);
+-		wait_waiting = FALSE;
++#endif
++	}
++
++	g_assert (wait_waiting);
++	wait_waiting = FALSE;
++#if GLIB_CHECK_VERSION(2,31,3)
++	g_mutex_unlock (&wait_mutex);
++#else
+ 	g_mutex_unlock (wait_mutex);
++#endif
+ 
+ 	return ret;
+ }
+@@ -136,22 +176,36 @@
+ 	GMainLoop *loop;
+ 	gpointer ret;
+ 
++#if !GLIB_CHECK_VERSION(2,31,3)
+ 	g_thread_init (NULL);
++#endif
+ 
+ 	loop = g_main_loop_new (NULL, FALSE);
++#if GLIB_CHECK_VERSION(2,31,3)
++	g_cond_init (&wait_condition);
++	g_cond_init (&wait_start);
++	g_mutex_init (&wait_mutex);
++	thread = g_thread_new ("testing", testing_thread, loop);
++#else
+ 	wait_condition = g_cond_new ();
+ 	wait_start = g_cond_new ();
+ 	wait_mutex = g_mutex_new ();
+-
+ 	thread = g_thread_create (testing_thread, loop, TRUE, NULL);
++#endif
++
+ 	g_assert (thread);
+ 
+ 	g_main_loop_run (loop);
+ 	ret = g_thread_join (thread);
+ 	g_main_loop_unref (loop);
+ 
++#if GLIB_CHECK_VERSION(2,31,2)
++	g_cond_clear (&wait_condition);
++	g_mutex_clear (&wait_mutex);
++#else
+ 	g_cond_free (wait_condition);
+ 	g_mutex_free (wait_mutex);
++#endif
+ 
+ 	return GPOINTER_TO_INT (ret);
+ }
+Index: gnome-keyring/pkcs11/gkm/gkm-timer.c
+===================================================================
+--- gnome-keyring.orig/pkcs11/gkm/gkm-timer.c	2012-01-03 12:27:31.087179910 +0100
++++ gnome-keyring/pkcs11/gkm/gkm-timer.c	2012-01-03 12:27:33.439180024 +0100
+@@ -38,6 +38,9 @@
+ static GStaticMutex timer_mutex = G_STATIC_MUTEX_INIT;
+ static GQueue *timer_queue = NULL;
+ static GThread *timer_thread = NULL;
++#if GLIB_CHECK_VERSION(2,31,3)
++static GCond timer_condition;
++#endif
+ static GCond *timer_cond = NULL;
+ static gboolean timer_run = FALSE;
+ static gint timer_refs = 0;
+@@ -57,7 +60,6 @@
+ {
+ 	GMutex *mutex = g_static_mutex_get_mutex (&timer_mutex);
+ 	GkmTimer *timer;
+-	GTimeVal tv;
+ 
+ 	g_mutex_lock (mutex);
+ 
+@@ -70,14 +72,26 @@
+ 			continue;
+ 		}
+ 
+-		g_get_current_time (&tv);
+-
+-		/* We have to wait until the next timer? */
+-		if (tv.tv_sec < timer->when) {
+-			tv.tv_sec = timer->when;
+-			tv.tv_usec = 0;
+-			g_cond_timed_wait (timer_cond, mutex, &tv);
+-			continue;
++		if (timer->when) {
++#if GLIB_CHECK_VERSION(2,31,3)
++			gint64 when = ((gint64)timer->when) * G_TIME_SPAN_SECOND;
++			gint64 offset = when - g_get_real_time ();
++			if (offset > 0) {
++				g_cond_wait_until (timer_cond, mutex, g_get_monotonic_time () + offset);
++				continue;
++			}
++#else
++			GTimeVal tv;
++			g_get_current_time (&tv);
++
++			/* We have to wait until the next timer? */
++			if (tv.tv_sec < timer->when) {
++				tv.tv_sec = timer->when;
++				tv.tv_usec = 0;
++				g_cond_timed_wait (timer_cond, mutex, &tv);
++				continue;
++			}
++#endif
+ 		}
+ 
+ 		/* Leave our thread mutex, and enter the module */
+@@ -109,13 +123,22 @@
+ 		g_atomic_int_inc (&timer_refs);
+ 		if (!timer_thread) {
+ 			timer_run = TRUE;
++#if GLIB_CHECK_VERSION(2,31,3)
++			timer_thread = g_thread_new ("timer", timer_thread_func, NULL);
++#else
+ 			timer_thread = g_thread_create (timer_thread_func, NULL, TRUE, &error);
++#endif
+ 			if (timer_thread) {
+ 				g_assert (timer_queue == NULL);
+ 				timer_queue = g_queue_new ();
+ 
+ 				g_assert (timer_cond == NULL);
++#if GLIB_CHECK_VERSION(2,31,3)
++				timer_cond = &timer_condition;
++				g_cond_init (timer_cond);
++#else
+ 				timer_cond = g_cond_new ();
++#endif
+ 			} else {
+ 				g_warning ("could not create timer thread: %s",
+ 				           egg_error_message (error));
+@@ -155,7 +178,11 @@
+ 		g_queue_free (timer_queue);
+ 		timer_queue = NULL;
+ 
++#if GLIB_CHECK_VERSION(2,31,3)
++		g_cond_clear (timer_cond);
++#else
+ 		g_cond_free (timer_cond);
++#endif
+ 		timer_cond = NULL;
+ 	}
+ }
+Index: gnome-keyring/pkcs11/gnome2-store/gkm-gnome2-standalone.c
+===================================================================
+--- gnome-keyring.orig/pkcs11/gnome2-store/gkm-gnome2-standalone.c	2012-01-03 12:27:31.075179911 +0100
++++ gnome-keyring/pkcs11/gnome2-store/gkm-gnome2-standalone.c	2012-01-03 12:27:33.443180024 +0100
+@@ -43,8 +43,6 @@
+ 		return CKR_ARGUMENTS_BAD;
+ 
+ 	g_type_init ();
+-	if (!g_thread_supported ())
+-		g_thread_init (NULL);
+ 
+ 	*list = gkm_gnome2_store_get_functions ();
+ 	return CKR_OK;
+Index: gnome-keyring/pkcs11/roots-store/gkm-roots-standalone.c
+===================================================================
+--- gnome-keyring.orig/pkcs11/roots-store/gkm-roots-standalone.c	2012-01-03 12:27:31.163179914 +0100
++++ gnome-keyring/pkcs11/roots-store/gkm-roots-standalone.c	2012-01-03 12:27:33.443180024 +0100
+@@ -59,9 +59,6 @@
+ 
+ 	g_type_init ();
+ 
+-	if (!g_thread_supported ())
+-		g_thread_init (NULL);
+-
+ 	gkm_crypto_initialize ();
+ 
+ 	*list = gkm_roots_store_get_functions ();
+Index: gnome-keyring/pkcs11/rpc-layer/gkm-rpc-dispatch.c
+===================================================================
+--- gnome-keyring.orig/pkcs11/rpc-layer/gkm-rpc-dispatch.c	2012-01-03 12:27:31.147179914 +0100
++++ gnome-keyring/pkcs11/rpc-layer/gkm-rpc-dispatch.c	2012-01-03 12:27:33.443180024 +0100
+@@ -2229,7 +2229,11 @@
+ 
+ 	ds->socket = new_fd;
+ 
++#if GLIB_CHECK_VERSION(2,31,3)
++	ds->thread = g_thread_new ("dispatch", run_dispatch_thread, &(ds->socket));
++#else
+ 	ds->thread = g_thread_create (run_dispatch_thread, &(ds->socket), TRUE, &error);
++#endif
+ 	if (!ds->thread) {
+ 		gkm_rpc_warn ("couldn't start thread: %s", egg_error_message (error));
+ 		close (new_fd);
+Index: gnome-keyring/pkcs11/secret-store/gkm-secret-standalone.c
+===================================================================
+--- gnome-keyring.orig/pkcs11/secret-store/gkm-secret-standalone.c	2012-01-03 12:27:31.103179911 +0100
++++ gnome-keyring/pkcs11/secret-store/gkm-secret-standalone.c	2012-01-03 12:27:33.443180024 +0100
+@@ -59,9 +59,6 @@
+ 
+ 	g_type_init ();
+ 
+-	if (!g_thread_supported ())
+-		g_thread_init (NULL);
+-
+ 	gkm_crypto_initialize ();
+ 
+ 	*list = gkm_secret_store_get_functions ();
+Index: gnome-keyring/pkcs11/ssh-store/gkm-ssh-standalone.c
+===================================================================
+--- gnome-keyring.orig/pkcs11/ssh-store/gkm-ssh-standalone.c	2012-01-03 12:27:31.119179912 +0100
++++ gnome-keyring/pkcs11/ssh-store/gkm-ssh-standalone.c	2012-01-03 12:27:33.443180024 +0100
+@@ -58,8 +58,6 @@
+ 		return CKR_ARGUMENTS_BAD;
+ 
+ 	g_type_init ();
+-	if (!g_thread_supported ())
+-		g_thread_init (NULL);
+ 
+ 	*list = gkm_ssh_store_get_functions ();
+ 	return CKR_OK;
+Index: gnome-keyring/pkcs11/xdg-store/gkm-xdg-standalone.c
+===================================================================
+--- gnome-keyring.orig/pkcs11/xdg-store/gkm-xdg-standalone.c	2012-01-03 12:27:31.131179913 +0100
++++ gnome-keyring/pkcs11/xdg-store/gkm-xdg-standalone.c	2012-01-03 12:27:33.443180024 +0100
+@@ -58,8 +58,6 @@
+ 		return CKR_ARGUMENTS_BAD;
+ 
+ 	g_type_init ();
+-	if (!g_thread_supported ())
+-		g_thread_init (NULL);
+ 
+ 	*list = gkm_xdg_store_get_functions ();
+ 	return CKR_OK;
+Index: gnome-keyring/tool/gkr-tool.c
+===================================================================
+--- gnome-keyring.orig/tool/gkr-tool.c	2012-01-03 12:27:31.031179908 +0100
++++ gnome-keyring/tool/gkr-tool.c	2012-01-03 12:27:33.447180025 +0100
+@@ -116,8 +116,7 @@
+ 	int ret = -1;
+ 	
+ 	g_type_init ();
+-	g_thread_init (NULL);
+-	
++
+ #ifdef HAVE_LOCALE_H
+ 	/* internationalisation */
+ 	setlocale (LC_ALL, "");
+Index: gnome-keyring/ui/gku-prompt.c
+===================================================================
+--- gnome-keyring.orig/ui/gku-prompt.c	2012-01-03 12:27:31.015179908 +0100
++++ gnome-keyring/ui/gku-prompt.c	2012-01-03 12:27:33.447180025 +0100
+@@ -1196,7 +1196,15 @@
+                                    gpointer user_data, GDestroyNotify destroy_notify)
+ {
+ 	AttentionReq *att = prepare_attention_req (window_id, callback, user_data, destroy_notify);
+-	GCond *cond = g_cond_new ();
++	GCond *cond;
++
++#if GLIB_CHECK_VERSION(2,31,3)
++	GCond condition;
++	g_cond_init (&condition);
++	cond = &condition;
++#else
++	cond = g_cond_new ();
++#endif
+ 
+ 	g_return_if_fail (att);
+ 	att->cond = cond;
+@@ -1209,7 +1217,11 @@
+ 		g_cond_wait (cond, g_static_mutex_get_mutex (&attention_mutex));
+ 	g_static_mutex_unlock (&attention_mutex);
+ 
++#if GLIB_CHECK_VERSION(2,31,3)
++	g_cond_clear (&condition);
++#else
+ 	g_cond_free (cond);
++#endif
+ }
+ 
+ #ifdef WITH_TESTABLE
+Index: gnome-keyring/gcr/gcr-viewer-tool.c
+===================================================================
+--- gnome-keyring.orig/gcr/gcr-viewer-tool.c	2011-09-18 13:50:14.122201000 +0200
++++ gnome-keyring/gcr/gcr-viewer-tool.c	2012-01-03 12:28:14.619182019 +0100
+@@ -88,7 +88,6 @@
+ 	GcrViewerWindow *window;
+ 
+ 	g_type_init ();
+-	g_thread_init (NULL);
+ 
+ #ifdef HAVE_LOCALE_H
+ 	/* internationalisation */

Modified: desktop/unstable/gnome-keyring/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-keyring/debian/patches/series?rev=32377&op=diff
==============================================================================
--- desktop/unstable/gnome-keyring/debian/patches/series [utf-8] (original)
+++ desktop/unstable/gnome-keyring/debian/patches/series [utf-8] Thu Jan 12 10:30:48 2012
@@ -1,3 +1,4 @@
 00git_gmodule_include.patch
+00git_glib_2.31_deprecations.patch
 03_kfreebsd.patch
 99_ltmain_as-needed.patch




More information about the pkg-gnome-commits mailing list